[Zope] python nigglettes
hi all, I'm currently experimenting with zope and noodling with pythoncan 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 excusesalong the lines of"yes, yes, I know, but look how easy it is to create a subclass of Animal..." cheers tom
Re: [Zope] python nigglettes
On Tue, 23 May 2000, you wrote: >> >> hi all, I'm currently experimenting with zope and noodling with >> pythoncan 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 excusesalong 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. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] [OT] Re: [Zope] python nigglettes
> Tom Smith wrote: > > hi all, I'm currently experimenting with zope and noodling with > pythoncan 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. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )