Re: Why is it that *dbm modules don't provide an iterator? (Language design question)

2009-04-11 Thread Akira Kitada
Opened a ticket for this and attached a patch. (experimental) http://bugs.python.org/issue5736 On Fri, Apr 10, 2009 at 8:39 AM, "Martin v. Löwis" wrote: I assumed there were some decisions behind this, rather than it's just not implemented yet. >>> I believe this assumption is wrong - i

Re: Why is it that *dbm modules don't provide an iterator? (Language design question)

2009-04-09 Thread Akira Kitada
keys() returns a list and my question was not about "how to" but more like "why"... I assumed there were some decisions behind this, rather than it's just not implemented yet. Best, On Friday, April 10, 2009, Joshua Kugler wrote: > Akira Kitada wrote: > >&g

Why is it that *dbm modules don't provide an iterator? (Language design question)

2009-04-09 Thread Akira Kitada
Hi, I was wondering why *dbm modules in Python do not give us an iterable interface? Take a look at an example below """ # Python 2.6 >>> import gdbm >>> d = gdbm.open("spam.db", "n") >>> d["key1"] = "ham" >>> d["key2"] = "spam" >>> >>> for k in d: ... print k ... Traceback (most recent call

Re: Performance of Python 3

2009-03-01 Thread Akira Kitada
Is this what you are looking for? http://shootout.alioth.debian.org/u32q/benchmark.php?test=all&lang=python3&lang2=yarv&box=1 On Sun, Mar 1, 2009 at 10:04 PM, Kless wrote: > Does anybody has seen the performance of Python 3? > Respect to speed it's the last language together to Ruby 1.8, but Rub

New book "The Python Programming Language" by Guido van Rossum

2009-02-12 Thread Akira Kitada
The Python Programming Language by Guido van Rossum, Raymond Hettinger, Jack Diedrich, David Beazley, David Mertz, Nicholas Coghlan to be published. http://www.amazon.co.uk/Python-Programming-Language-Guido-Rossum/dp/0132299690 Anyone found the TOC of this? Thanks, -- http://mail.python.org/mailm

Re: python3 tutorial for newbie

2009-02-10 Thread Akira Kitada
http://wiki.python.org/moin/Python3.0Tutorials On Wed, Feb 11, 2009 at 3:22 AM, Gary Wood wrote: > Can someone recommend a good tutorial for Python 3, ideally that has tasks > or assignments at the end of each chapter. > Please, > > -- > http://mail.python.org/mailman/listinfo/python-list > > --

Re: *.python.org broken?

2009-01-25 Thread Akira Kitada
http://downforeveryoneorjustme.com/ On Sun, Jan 25, 2009 at 10:06 AM, wrote: > Hi all, > > Is anybody else having trouble accessing sites (including www, docs, > wiki) in the python.org tree, or is it just me? (Or just .au?) > > Cheers, > > Tim > -- > http://mail.python.org/mailman/listinfo/pyth

Re: Pythonic list/tuple/dict layout?

2009-01-25 Thread Akira Kitada
> These are the only two that follow PEP 8; the others don't have > four-space indent levels. In those examples, the following sentence in PEP 8 would be applied. "Make sure to indent the continued line appropriately." > I actually use this style: > >foo = { >0: 'spam', >1: '

Re: Pythonic list/tuple/dict layout?

2009-01-25 Thread Akira Kitada
> BTW, there's no need to use such large examples. Three items per dict > would be sufficient to illustrate the styles, using ten items doesn't add > anything useful to the discussion. I worried to be told 'you can make it in a line like {"ham": "jam", "spam": "alot"}' ;) -- http://mail.python.org

Re: Pythonic list/tuple/dict layout?

2009-01-25 Thread Akira Kitada
> Wow! A Python debate over curly brace placement! Imagine that! PEP8 even deals with tabs vs spaces, where to put a blank line, etc :) -- http://mail.python.org/mailman/listinfo/python-list

Pythonic list/tuple/dict layout?

2009-01-25 Thread Akira Kitada
Hi, There is more than one way to write a list/tuple/dict in Python, and actually different styles are used in standard library. As a hobgoblin of little minds, I rather like to know which style is considered "Pythonic" in the community. I collected common layout from existing code and pasted the

Can I build Python with lthread instead of pthread?

2008-10-31 Thread Akira Kitada
Hi, I'm running Python 2.5 on FreeBSD 4. pthread on FreeBSD 4 has some problems so I would like to build python with lthread (linuxthreads) instead of BSD's pthread. So I looked at configure options but couldn't find any options for it. Python support lthread? and how can I build python with it?

Re: Cannot build _multiprocessing, math, mmap and readline of Python 2.6 on FreeBSD 4.11 w/ gcc 2.95.4

2008-10-25 Thread Akira Kitada
t;[EMAIL PROTECTED]> wrote: > On 2008-10-25 08:39, Akira Kitada wrote: >> Hi list, >> >> I was trying to build Python 2.6 on FreeBSD 4.11 and found it failed >> to build some of the modules. >> >> """ >> Failed to find the necessary bits

Cannot build _multiprocessing, math, mmap and readline of Python 2.6 on FreeBSD 4.11 w/ gcc 2.95.4

2008-10-24 Thread Akira Kitada
Hi list, I was trying to build Python 2.6 on FreeBSD 4.11 and found it failed to build some of the modules. """ Failed to find the necessary bits to build these modules: _bsddb _sqlite3 _tkinter gdbm linuxaudiodev spwd sunaudiodev To find the necessary bit