Re: [OT] whitespace (was Re: stupid perl question)

2006-05-31 Thread John Machin
On 31/05/2006 8:17 PM, Sion Arrowsmith wrote: > John Machin <[EMAIL PROTECTED]> wrote: >> Whitespace is a silly term, anyway (IMHO); is there such a >> thing as a space that is not white? > > Yes, if you go back to the term's origins in printshops. A solid > block of ink is space, not print, but

[OT] whitespace (was Re: stupid perl question)

2006-05-31 Thread Sion Arrowsmith
John Machin <[EMAIL PROTECTED]> wrote: > Whitespace is a silly term, anyway (IMHO); is there such a >thing as a space that is not white? Yes, if you go back to the term's origins in printshops. A solid block of ink is space, not print, but it's not whitespace. We've kept the word alive, even if

Re: stupid perl question

2006-05-30 Thread John Machin
On 31/05/2006 5:55 AM, Jorgen Grahn wrote: > On Sat, 27 May 2006 11:11:40 +1000, John Machin <[EMAIL PROTECTED]> wrote: > ... >> Yes, you could write out the whitespace characters for the 8-bit >> encoding of your choice, or you could find them using Python (and get >> some possibly surprising an

Re: stupid perl question

2006-05-30 Thread Jorgen Grahn
On Sat, 27 May 2006 11:11:40 +1000, John Machin <[EMAIL PROTECTED]> wrote: ... > Yes, you could write out the whitespace characters for the 8-bit > encoding of your choice, or you could find them using Python (and get > some possibly surprising answers): > > >>> mkws = lambda enc, sz=256: "".join

Re: stupid perl question

2006-05-26 Thread John Machin
On 27/05/2006 9:51 AM, BJörn Lindqvist wrote: >> how can i split a string that contains white spaces and '_' >> >> any clue? > > If the white spaces and the '_' should be applied equivalently on the > input and you can enumerate all white space characters, you could do > like this: Yes, you could

Re: stupid perl question

2006-05-26 Thread John Machin
On 27/05/2006 9:15 AM, M.N.A.Smadi wrote: > hi guys; > > sorry for sending a perl question here, but python guy "HAD TO" look at > perl code; > > how can i split a string that contains white spaces and '_' > > any clue? > > thanks > moe smadi Well the screamingly obvious way to do in Python w

Re: stupid perl question

2006-05-26 Thread BJörn Lindqvist
> how can i split a string that contains white spaces and '_' > > any clue? If the white spaces and the '_' should be applied equivalently on the input and you can enumerate all white space characters, you could do like this: def split_helper(list, delims): if not delims: return list

stupid perl question

2006-05-26 Thread M.N.A.Smadi
hi guys; sorry for sending a perl question here, but python guy "HAD TO" look at perl code; how can i split a string that contains white spaces and '_' any clue? thanks moe smadi -- http://mail.python.org/mailman/listinfo/python-list