[issue32065] range_iterator doesn't have length, leads to surprised result

2017-11-17 Thread yegle
yegle <cnye...@gmail.com> added the comment: Hmm I think this also applies to list_listiterator. In general I'd expect these to be true: l = [1,2,3] r = range(3) assert len(l) == len(reversed(l)) assert len(r) == len(reversed(r)) -- ___

[issue32065] range_iterator doesn't have length, leads to surprised result

2017-11-17 Thread yegle
New submission from yegle <cnye...@gmail.com>: This also affects xrange in Python2, so I chose the affected version as python27. range object (and xrange in Python2) has __len__(), but the range_iterator object created from __reversed__() doesn't have __len__. Python2: >>>

[issue20482] smtplib.SMTP.sendmail: improve exception message

2015-02-22 Thread yegle
yegle added the comment: I have no plan to work further, Mark can take the code and improve anyway you want. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20482

[issue10109] itertools.product with infinite iterator cause MemoryError.

2014-10-01 Thread yegle
yegle added the comment: Found another example that shows horrible performance when using itertools.product: def gen(): l = [itertools.permutations(range(10)) for _ in range(10)] g = itertools.product(*l) for i in g: yield i A simple next() to this generator takes 16 seconds on my

[issue20482] smtplib.SMTP.sendmail: improve exception message

2014-02-01 Thread yegle
New submission from yegle: Currently the `msg` argument of `smtplib.SMTP.sendmail` accept a `str` in Py3k if every characters in this `str` is in ASCII range, or a `bytes`. This is confusing for new comer because: 1. When you send your mail using only ASCII characters, everything is fine

[issue19861] Update What's New for Python 3.4

2013-12-23 Thread yegle
yegle added the comment: Hi all, It's my first time commenting on this issue tracker so bear with me if this looks naive. For the `plistlib` package, from Apple's own manual[1], there's actually a third JSON format. It'll be good to indicate that `plistlib` doesn't support JSON format