Dear Guru, I have added def and it doesnt work Sincerly, F

Gerhard Häring gerhard at bigfoot.de
Thu Mar 14 22:01:55 EST 2002


phil hunt wrote in comp.lang.python:
> On 15 Mar 2002 01:12:23 GMT, Gerhard Häring <gerhard at bigfoot.de> wrote:
>>Oscar wrote in comp.lang.python:
>>> I have added 
>>> 
>>> def joinsplit = (join(split(lines, '"'), ' '))
>>>         return joinsplit
>>
>>No wonder this doesn't work, as you've apparently haven't made very
>>much effort to understand what you're doing here.
>>
>>Sorry to be so blunt, but you can't write software just by guessing
>>about the syntax. 
> 
> Really? I do some of the time, when I don't remember it and can't be 
> bothered to look in the manual.

Me too, mostly by trying stuff out at Python prompt, for instance if I
forgot the semantics of slicing again.

> The surprising thing is, the rest of his defs are OK.

Not surprising: somebody else wrote that code.

Gerhard
-- 
mail:   gerhard <at> bigfoot <dot> de       registered Linux user #64239
web:    http://www.cs.fhm.edu/~ifw00065/    OpenPGP public key id 86AB43C0
public key fingerprint: DEC1 1D02 5743 1159 CD20  A4B6 7B22 6575 86AB 43C0
reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))



More information about the Python-list mailing list