Re: [Python-3000] doctests vs. unittests (was Re: pimp; restructuring the standard library)

2007-06-29 Thread Simon Percivall
On 30 jun 2007, at 01.19, Ron Adam wrote: > It would be cool if the documents files could also contain the doc > tests > instead of them being in the source code. I'm sure the could be > done now, > but there isn't a standard way to do this. Currently I create a > seperate > test module whi

Re: [Python-3000] PEP 3132: Extended Iterable Unpacking

2007-05-04 Thread Simon Percivall
On 4 maj 2007, at 06.13, Greg Ewing wrote: > Simon Percivall wrote: >> if the proposal is constrained to only allowing the *name at >> the end, wouldn't a more useful behavior be to not exhaust the >> iterator, making it similar to: >> > it = iter(range(10)) &g

Re: [Python-3000] PEP 3132: Extended Iterable Unpacking

2007-05-03 Thread Simon Percivall
On 2 maj 2007, at 20.08, Guido van Rossum wrote: > [Georg] >>> a, *b, c = range(5) >>> a 0 >>> c 4 >>> b [1, 2, 3] > > > That sounds messy; only allowing *a at the end seems a bit more > manageable. But I'll hold off until I can shoot holes in your > impl

Re: [Python-3000] Making strings non-iterable

2006-04-13 Thread Simon Percivall
On 13 apr 2006, at 20.01, Ian Bicking wrote: > I propose that strings (unicode/text) shouldn't be iterable. > Seeing this: > > >i >t >e >m > >1 > > > a few too many times... it's annoying. Instead, I propose that > strings > get a list-like view on their characters.