Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: API question

Thread Tools

Re: API question

Ethan Furman
Posts: n/a
Ole Martin Bjørndalen wrote:
> On Thu, Aug 2, 2012 at 5:55 PM, Ethan Furman <(E-Mail Removed)> wrote:
>> SQLite has a neat feature where if you give it a the file-name of ':memory:'
>> the resulting table is in memory and not on disk. I thought it was a cool
>> feature, but expanded it slightly: any name surrounded by colons results in
>> an in-memory table.
>> I'm looking at the same type of situation with indices, but now I'm
>> wondering if the :name: method is not pythonic and I should use a flag
>> (in_memory=True) when memory storage instead of disk storage is desired.
>> Thoughts?

> I agree that the flag would be more pythonic in
> I was not aware that you are adding sqlite functionality to your
> library. This is very cool!

Actually, I'm not. I had stumbled across that one tidbit and thought it
was cool, but cool is not always pythonic.

> I am considering adding a "streaming=True" flag which would make the
> table class a record generator,

You can do this by implementing either __getitem__ or __iter__, unless
the streaming flag would also make your table not in memory.

> I hope this can help you somehow in your decision making process.

All comments appreciated. Thanks!

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
platform specific API or C standard API George2 C Programming 13 11-13-2007 06:29 PM
.Net Profiler API in 64 bit windows -FunctionMapper callback API =?Utf-8?B?TGVv?= Windows 64bit 0 09-05-2007 06:10 PM
Profiling API or Membership API John123 ASP .Net 0 10-20-2006 03:18 PM
Calling the C API from Python and Python program from same C API -bidirectional Praveen, Tayal (IE10) Python 0 03-17-2005 06:33 AM
What API replaces the unlock API that existed in gcc 2.9.3? Shlomo Anglister C++ 1 08-02-2004 06:50 PM