hi all, I'm currently experimenting with zope and noodling with python....can anyone give me an answer on these? Python is beautiful (nearly as beautiful as Prograph (but that's another story)). I'm a BIG fan of human readable code, I loved HyperCard and pathelogically refused to get my head past Perl. But there a few irritants that I really need to know why they're there. 1. ":" This smacks of geek...surely the interpreter could figure out if this wasn't there...couldn't it? Surely there's a workaround for someone like me. Isn't there? What if I "promised" never to write one-line functions, could I do without it then? 2."elif" Boy this is awkward, I though "elseif" was bad but "elif" !! Can I use/implement alternatives "elseif" would be a start "else if" would be better...more natural. I love the fact that with Python it's OK (nay encouraged) to document code. I can live with the "__whatever__" methods but ":" and "elif" are so ugly that as I'm showing someone how cool Python is, I get embarrased...and make excuses....along the lines of...."yes, yes, I know, but look how easy it is to create a subclass of Animal..." cheers tom
On Tue, 23 May 2000, you wrote:
hi all, I'm currently experimenting with zope and noodling with python....can anyone give me an answer on these?
Python is beautiful (nearly as beautiful as Prograph (but that's another story)).
I'm a BIG fan of human readable code, I loved HyperCard and pathelogically refused to get my head past Perl. But there a few irritants that I really need to know why they're there.
1. ":" This smacks of geek...surely the interpreter could figure out if this wasn't there...couldn't it? Surely there's a workaround for someone like me. Isn't there? What if I "promised" never to write one-line functions, could I do without it then?
2."elif" Boy this is awkward, I though "elseif" was bad but "elif" !! Can I use/implement alternatives "elseif" would be a start "else if" would be better...more natural.
I love the fact that with Python it's OK (nay encouraged) to document code. I can live with the "__whatever__" methods but ":" and "elif" are so ugly that as I'm showing someone how cool Python is, I get embarrased...and make excuses....along the lines of...."yes, yes, I know, but look how easy it is to create a subclass of Animal..."
cheers
tom
Even if the elif was not there, there would be something else to complain about it. My advise take the bad with the good. Also, there is more power in the "else" , for example, you can do an else to a "for" statement - which is nice and can't even be done in C. Regards, Luis.
Tom Smith wrote:
hi all, I'm currently experimenting with zope and noodling with python....can anyone give me an answer on these?
Python is beautiful (nearly as beautiful as Prograph (but that's another story)).
I'm a BIG fan of human readable code, I loved HyperCard and pathelogically refused to get my head past Perl. But there a few irritants that I really need to know why they're there.
0. People sending HTML to emailing lists.
1. ":" This smacks of geek...surely the interpreter could figure out if this wasn't there...couldn't it? Surely there's a workaround for someone like me. Isn't there? What if I "promised" never to write one-line functions, could I do without it then?
See the recent discussion on c.l.py. Basically, there are several situations where it makes clarity, not only for reader/pprogramer but for the interpreter.
2."elif" Boy this is awkward, I though "elseif" was bad but "elif" !! Can I use/implement alternatives "elseif" would be a start "else if" would be better...more natural.
Personally, I write fery few elifs, mainly a serioes of ifs with continues will do niceley.
participants (3)
-
Bill Anderson -
Luis Cortes -
Tom Smith