Re: Odd listcomp behaviour

2010-12-17 Thread MRAB
On 17/12/2010 23:08, Emile van Sebille wrote: Does anyone else consider this a bug? Python 2.6.2 (r262:71600, Jun 16 2009, 11:09:39) [GCC 3.4.6 20060404 (Red Hat 3.4.6-10)] on linux2 Type "help", "copyright", "credits" or "license" for more information. ---1--- >>> skippedords = '1,2,3,4,5' >

Re: Odd listcomp behaviour

2010-12-17 Thread Emile van Sebille
On 12/17/2010 3:17 PM Emile van Sebille said... On 12/17/2010 3:08 PM Emile van Sebille said... Does anyone else consider this a bug? Hmmm... looks like it's split that I've got the issue with... Nevermind... if it's documented it's not a bug, right? Hrrmph. Emile str.split([sep[, maxs

Re: Odd listcomp behaviour

2010-12-17 Thread Ethan Furman
Emile van Sebille wrote: Does anyone else consider this a bug? Python 2.6.2 (r262:71600, Jun 16 2009, 11:09:39) [GCC 3.4.6 20060404 (Red Hat 3.4.6-10)] on linux2 Type "help", "copyright", "credits" or "license" for more information. ---1--- >>> skippedords = '1,2,3,4,5' >>> ['10%s' % ii for i

Re: Odd listcomp behaviour

2010-12-17 Thread Emile van Sebille
On 12/17/2010 3:08 PM Emile van Sebille said... Does anyone else consider this a bug? Hmmm... looks like it's split that I've got the issue with... >>> "this is a test".split() ['this', 'is', 'a', 'test'] >>> "this is a test".split(' ') ['this', 'is', 'a', 'test'] >>> "".split(' ') [''] >>> "

Odd listcomp behaviour

2010-12-17 Thread Emile van Sebille
Does anyone else consider this a bug? Python 2.6.2 (r262:71600, Jun 16 2009, 11:09:39) [GCC 3.4.6 20060404 (Red Hat 3.4.6-10)] on linux2 Type "help", "copyright", "credits" or "license" for more information. ---1--- >>> skippedords = '1,2,3,4,5' >>> ['10%s' % ii for ii in skippedords.split(',')]