[Python-3000] Proposal to add __str__ method to iterables.

2008-05-27 Thread Carl Johnson
Proposal to add __str__ method to iterables: Proposed behavior of the __str__ method for iterables is that it returns the result of "".join(str(i) for i in self). Justification: Notice this difference in the behavior of filter* and a list comprehension: >>> filter(lambda c: c!="a", "abra

[Python-3000] Minor documentation issue with pep-3119

2008-06-07 Thread Carl Johnson
anymore! Someone should fix that to say Sequence instead. Thanks, Carl Johnson ___ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

[Python-3000] Is this a bug with list comprehensions or not?

2008-07-09 Thread Carl Johnson
n feeling is that these two cases should behave the same way, but I could be wrong. I hope this isn't an old issue, but I've been lurking for a few months and haven't heard any discussion of this. -- Carl Johnson ___ Python-3000

Re: [Python-3000] Is this a bug with list comprehensions or not?

2008-07-10 Thread Carl Johnson
Filed http://bugs.python.org/issue3331 I added this to the bottom of the report, but perhaps it should be a discussion topic, not a "bug" per se: One might object that the behavior of the list comprehension is identical to that of a for-loop: >>> r = [] >>> for x in range(100):

[Python-3000] Is this a bug with list comprehensions or not?

2008-07-12 Thread Carl Johnson
own feeling is that these two cases should behave the same way, but I could be wrong. I hope this isn't an old issue, but I've been lurking for a few months and haven't heard any discussion of this. -- Carl Johnson ___ Python-3000

Re: [Python-3000] More PEP 3101 changes incoming

2007-08-15 Thread Carl Johnson
ry: #if spec contains letters not understood, __format__ raises NI return obj.__format__(spec) except NotImplemented: pass #everything gets put through str as a last resort return str(obj).__format__(spec) #last chance before throwing exception