Re: missing 'xor' Boolean operator

2009-07-16 Thread Lino Mastrodomenico
valent to bool(a or b). (Modulo crazy things like redefining "bool" or having a __bool__ with side effects.) In the first expression you implicitly request a bool because you use "not", in the second one you do this with an explicit "bool". -- Lino Mastrodomenico -- http://mail.python.org/mailman/listinfo/python-list

Re: memoization module?

2009-07-05 Thread Lino Mastrodomenico
2009/7/5 kj : > Is there a memoization module for Python?  I'm looking for something > like Mark Jason Dominus' handy Memoize module for Perl. Check out the "memoized" class example here: <http://wiki.python.org/moin/PythonDecoratorLibrary#Memoize>

Re: Code that ought to run fast, but can't due to Python limitations.

2009-07-05 Thread Lino Mastrodomenico
are very strange beasts and the bottlenecks may be in innocent-looking places! -- Lino Mastrodomenico -- http://mail.python.org/mailman/listinfo/python-list

Re: [Python-Dev] PEP 383: Non-decodable Bytes in System Character Interfaces

2009-04-24 Thread Lino Mastrodomenico
currently exist in Python codecs. Why not use U+DCxx for non-UTF-8 encodings too? Overall I like the PEP: I think it's the best proposal so far that doesn't put an heavy burden on applications that only want to do simple things with the API. -- Lino Mastrodomenico -- http://mail.python.org/mailman/listinfo/python-list