ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> python-list
python-list
Clever One Liners
by Michael Chermside other posts by this author
Jul 2 2003 11:06PM messages near this date
Clever One Liners | i18n worries
Hannu Kankaanpää writes:
>  Could be even written as a perverted one-liner.

I'm not picking on you in particular, there have been several people
doing this lately, but I'd like to ask folks to please lay off the
quest for one-liners.

I understand the neat, oh-so-clever feeling one gets by trying to
cram the most functionality into the least space, but if you're going
to try that, do it in Perl (or better yet, APL) where it works so
much better. I'm not putting down the exercise... I realize that it's
all in good fun... but people who are new to Python and who read this
newsgroup might get the wrong idea if they see a clever one-liner
proposed as the solution for every easy question. It's simply NOT 
Pythonic to try to write clever one-liners, and we don't want to let
newbies think it's appropriate.

>  ...Maybe a real 'for' loop for getting the words would be better
>  in this case though. So that the input could be verified too.

See, I can bring this up in response to Hannu's posting without 
pointing fingers since he clearly understands (and points out) the
advantages of a less compact style.

Donning-my-asbestos-suit-now lly,

-- Michael Chermside


-- 
http://mail.python.org/mailman/listinfo/python-list

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved