Re: Programming newbie coming from Ruby: a few Python questions

2006-08-03 Thread H J van Rooyen

 
Dennis Lee Bieber [EMAIL PROTECTED] wrote:


| On Wed, 02 Aug 2006 22:25:35 +0200, Jarek Zgoda [EMAIL PROTECTED]
| declaimed the following in comp.lang.python:
| 
|  
|  At the end of day we will be these who count bodies. ;)
| 
| o/~ Listen children, to a story
| that was written long ago
| 'bout a kingdom, on a mountain
| and the valley far below ... o/~
| -- 

Oh the mountain sheep were sweeter, 
but the valley sheep were fatter,
we therefore deemed it meeter,
to carry off the latter..



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


Re: Programming newbie coming from Ruby: a few Python questions

2006-08-03 Thread Thomas Nelson
I strongly recommend trying to come up with your own projects.  Just
pick small things that reflect something you actually want to do: maybe
make a simple board game, or a few scripts to help you keep all your
files organized, etc.  Generally speaking I think it's easier to teach
yourself a language if you have a project you care about finishing.  I
was pleasantly surprised by how easy python makes it to travel from It
would be cool if I could... to finished product.  In my own case, I'm
a college student, and I wanted a program that could help me schedule
my next semester's classes without conflicts and with the maximum sleep
possible.  That first project gave me a lot of good python
experience, and I know use python all the time for real life
applications.

THN

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


Re: Programming newbie coming from Ruby: a few Python questions

2006-08-02 Thread Laurent Pointal
[EMAIL PROTECTED] a écrit :
...
 Ideally, I'd like a whole series of projects where I'm walked through
 how to go about writing real Python. The way I look at it, nobody
 learnt to build a house just from reading about building materials!

Take a look at Dive Into Python from Mark Pilgrim, good examples with
comments.

http://diveintopython.org/

Its available as paper-print or as electronic reading.

A+

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


Re: Programming newbie coming from Ruby: a few Python questions

2006-08-02 Thread Ravi Teja
 Is this kind of cleverness what is usually known as magic?
 I suspect that this has something to do with it, but not completely
 sure...

:-). It must be. Now Django has a magic removal branch.

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


Re: Programming newbie coming from Ruby: a few Python questions

2006-08-02 Thread Bruno Desthuilliers
[EMAIL PROTECTED] wrote:
 Hi all. I've been try to learn ruby for a few months but I'm about
 ready to give up. The available books either assume a programming
 background, or are out of date. Anyway, I think python may suit me more
 due to its 'theres one way to do it' philosophy (hope the quote is
 right)! 

Actually it's :
There should be one-- and preferably only one --obvious way to do it.

And FWIW, it's followed by:
Although that way may not be obvious at first unless you're Dutch.

!-)

NB : launch your Python interactive shell and type:

 import this

to get the whole thing.


 Another quote that I liked was:
 
  'Clever is not considered a compliment in Python.' (don't know where I
 read that...)

I don't remember having read this, but it probably refers to Brian
Kernighan:
Debugging is twice as hard as writing the code in the first place.
 Therefore, if you write the code as cleverly as possible, you are,
 by definition, not smart enough to debug it.


 In Ruby, there are many ways to do the same thing and cleverness seems
 to be held in high regard. These attitudes are not too helpful for
 beginners in my experience. Anyway, enough waffle.
 
 What books and tutorials are recommended to learn Python? 

There are some recommandations on python.org:
http://wiki.python.org/moin/PythonBooks
http://www.python.org/doc/intros/

Mark Lutz's Programming Python was a mostly good intermediate book,
but it's a bit outdated now.

 The tutorial
 that comes with Python is great and has given me a good overview but I
 think I'd benefit from some programming projects, now I have a little
 understanding of how Python works.
 
 Ideally, I'd like a whole series of projects where I'm walked through
 how to go about writing real Python. The way I look at it, nobody
 learnt to build a house just from reading about building materials!

Indeed. But you don't necessarily need to follow a tutorial for this -
just think of some programs you'd like to write, and try to write them.
You can ask for help and submit (at least parts of) your work for review
here. FWIW, examples in books and tutorials are usually meant to help
you graps some points, features, idioms and gotchas, and are seldom as
complex and complete as real programs.

 Any other tips for getting up to speed with Python fairly quickly will
 be greatly appreciated.

Lurking here may be a good idea...

-- 
bruno desthuilliers
python -c print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in '[EMAIL PROTECTED]'.split('@')])
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Programming newbie coming from Ruby: a few Python questions

2006-08-02 Thread jitya
[EMAIL PROTECTED] wrote:

 Hi all. I've been try to learn ruby for a few months but I'm about
 ready to give up.

Perfection is achieved only on the point of collapse. -- C.N. Parkinson


Welcome to Python , apart from the tutorials whenever time permits do
read this articles .

Why Python :http://www.linuxjournal.com/article/3882
The Python Paradox :http://www.paulgraham.com/pypar.html
Why I Promote Python : http://www.prescod.net/python/why.html

Regards
Jitendra Nair
Ensim India Pvt Ltd ,
Pune , India



 The available books either assume a programming
 background, or are out of date. Anyway, I think python may suit me more
 due to its 'theres one way to do it' philosophy (hope the quote is
 right)! Another quote that I liked was:

  'Clever is not considered a compliment in Python.' (don't know where I
 read that...)

 In Ruby, there are many ways to do the same thing and cleverness seems
 to be held in high regard. These attitudes are not too helpful for
 beginners in my experience. Anyway, enough waffle.

 What books and tutorials are recommended to learn Python? The tutorial
 that comes with Python is great and has given me a good overview but I
 think I'd benefit from some programming projects, now I have a little
 understanding of how Python works.

 Ideally, I'd like a whole series of projects where I'm walked through
 how to go about writing real Python. The way I look at it, nobody
 learnt to build a house just from reading about building materials!

 Any other tips for getting up to speed with Python fairly quickly will
 be greatly appreciated.
 
 If anyone can help, thanks very much

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


Re: Programming newbie coming from Ruby: a few Python questions

2006-08-02 Thread Bruno Desthuilliers
Luis M. González wrote:
 Delaney, Timothy (Tim) wrote:
(snip)
 Clever in this context generally means using a trick/hack that is
 non-obvious (often even after you understand it). Cleverness often
 leads to difficult-to-understand code, which is contrary to the python
 philosophy.

 There are occasionally times when cleverness is useful, but in those
 cases it should always be commented explaining exactly what it is doing,
 and why a non-clever solution was not used. Most of the time there's
 still a better non-clever way to do it, but the coder is not clever
 enough to find it ;)

 
 Is this kind of cleverness 

Which one ?-)

 what is usually known as magic?
 I suspect that this has something to do with it, but not completely
 sure...

Python's magic is mostly about using the more advanced features of the
language (closures, special '__magic__' methods, descriptors,
metaclasses) and take full advantage of Python's object model and
dynamicity to reduce boilerplate and factor out repetition. All this
surely requires a good understanding of Python's object model - and may
look somewhat magic to newcomers -, but no particular cleverness.

The key here is not to use these features for the sake of using them,
but only if and when it really simplifies the rest of the code by
factoring out the existing complexity.

The unpythonic cleverness is mostly about trying to stuff as much
operations as possible in a single expression. Which doesn't change
anything to the complexity of the code but makes the whole thing much
more difficult to understand - so it actually *adds* a level of complexity.

You can take a look at my sig for an example of unpythonic 'cleverness':

print '@'.join(['.'.join([w[::-1] \
for w in p.split('.')]) \
for p in '[EMAIL PROTECTED]'.split('@')])


How much time do you need to understand what happens here ? Way too much
anyway. Now look at the dumbiest way to write the same thing:

parts = '[EMAIL PROTECTED]'.split('@')
reversed_parts = []

for part in parts:
  words = part.split('.')
  reversed_words = []

  for word in words:
  # word[::-1] reverse the word,
  # ie abc[::-1] == cba.
  reversed_words.append(word[::-1])

  reversed_parts.append('.'.join(reversed_words))

reversed_sig = @.join(reversed_parts)
print reversed_sig

It's perhaps a bit longer, perhaps less 'elegant' (for a somewhat
perlish definition of 'elegance'), certainly less clever, but at least
it's something that doesn't requires any special attention to understand
- except perhaps for the extended slice stuff, but it's explained by a
comment.


-- 
bruno desthuilliers
python -c print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in '[EMAIL PROTECTED]'.split('@')])
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Programming newbie coming from Ruby: a few Python questions

2006-08-02 Thread simonharrison
thanks very much for all the comments, links to articles and other
help.The Ruby crowd says you guys are no where near as friendly as
them! I was half expecting a nervous breakdown after writing my first
post here.

Cheers again

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


Re: Programming newbie coming from Ruby: a few Python questions

2006-08-02 Thread BartlebyScrivener

[EMAIL PROTECTED] wrote:

 The Ruby crowd says you guys are no where
  near as friendly as them!

Slander! Defamation!

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


Re: Programming newbie coming from Ruby: a few Python questions

2006-08-02 Thread Tim Chase
 The Ruby crowd says you guys are no where near as friendly as 
 them! I was half expecting a nervous breakdown after writing
 my first post here.

Maybe the Ruby folks have to be friendlier to make up for their 
language of choice... :*)

The python mailing list is your pretty typical technical mailing 
list:  if you do your own homework, state your problem clearly 
(with full error messages, actual data, not writing in 
AOL/133t-speak, etc), and have already tried searching the 
web/docs, then you'll find folks here are quite helpful.  Not 
just helpful, but *fast* in their helpfulness too.

-tkc



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


Re: Programming newbie coming from Ruby: a few Python questions

2006-08-02 Thread Ted
I have always liked this tutorial for beginners:

http://www.ibiblio.org/obp/thinkCSpy/

Cheers,
Ted

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


Re: Programming newbie coming from Ruby: a few Python questions

2006-08-02 Thread Luis M. González

BartlebyScrivener wrote:
 [EMAIL PROTECTED] wrote:

  The Ruby crowd says you guys are no where
   near as friendly as them!

 Slander! Defamation!

The time to crush our enemies has come.
This is the Jihad! Death to the infidels

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


Re: Programming newbie coming from Ruby: a few Python questions

2006-08-02 Thread Jarek Zgoda
Luis M. González napisał(a):

The Ruby crowd says you guys are no where
 near as friendly as them!

Slander! Defamation!
 
 The time to crush our enemies has come.
 This is the Jihad! Death to the infidels

We'll kill them all, then we'll piss on flowers in their gardens. We'll
eat their cats and burn their yearbooks of IEEE Proceedings. The
revenge is tasting sweet.

At the end of day we will be these who count bodies. ;)

-- 
Jarek Zgoda
http://jpa.berlios.de/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Programming newbie coming from Ruby: a few Python questions

2006-08-02 Thread infidel
 The time to crush our enemies has come.
 This is the Jihad! Death to the infidels

Whoa, dude, let's not get carried away now, 'k?

Looking-over-his-shoulder-ly y'rs,
infidel

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


Re: Programming newbie coming from Ruby: a few Python questions

2006-08-02 Thread BartlebyScrivener
Stand and fight, Python brothers. Fear not, the Ruby horde!

From this day to the ending of the world,
But we in it shall be remember'd;
We few, we happy few, we band of brothers;
For he to-day that sheds his blood with me
Shall be my brother; be he ne'er so vile,
This day shall gentle his condition:
And gentlemen in England now a-bed
Shall think themselves accursed they were not here,
And hold their manhoods cheap whiles any speaks
That fought with us upon Saint Crispin's day.

rd

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


Re: Programming newbie coming from Ruby: a few Python questions

2006-08-02 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit :
 thanks very much for all the comments, links to articles and other
 help.The Ruby crowd says you guys are no where near as friendly as
 them! 

Yes. Python bashing sadly appears to be the national sport amongst 
Rubyists. Looks like a puberty crisis to me, and I guess (or at least 
hope) this will calm down when Ruby will start to mature.

FWIW, c.l.py is still one of the more helpful and friendly place on 
usenet. This doesn't mean there's no RTFMs, but at least they are 
usually gently followed by a link to the relevant section !-)

 I was half expecting a nervous breakdown after writing my first
 post here.

Sorry if you're disappointed. But you can take a chance on c.l.lisp if 
you really want a newsgroup that's nowhere as friendly as this one !-)

 Cheers again

Welcome on board - hope you'll enjoy the trip.

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


Re: Programming newbie coming from Ruby: a few Python questions

2006-08-02 Thread Bruno Desthuilliers
BartlebyScrivener a écrit :
 [EMAIL PROTECTED] wrote:
 
 
The Ruby crowd says you guys are no where
 near as friendly as them!
 
 
 Slander! Defamation!
 
I'd rather say cluelessness and jealousy !-)
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Programming newbie coming from Ruby: a few Python questions

2006-08-02 Thread Aahz
In article [EMAIL PROTECTED],
crystalattice [EMAIL PROTECTED] wrote:

The best book I've found for teaching you the language is from Deitel
and Deitel:  Python, How to Program.  It's outdated in that is uses
Python 2.2 but the vast majority of concepts still apply; it does
mention when certain features are deprecated so you shouldn't have a
problem.

The main problem with the Deitel book is that it does not, in fact,
teach you how to program in Python.  Instead, it teaches you how to
program in Java using Python.  (That's a little bit of an overstatement,
admittedly, but not much of one.)  There is also lots of incorrect
information.
-- 
Aahz ([EMAIL PROTECTED])   * http://www.pythoncraft.com/

Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are, by
definition, not smart enough to debug it.  --Brian W. Kernighan
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Programming newbie coming from Ruby: a few Python questions

2006-08-02 Thread John Machin

BartlebyScrivener wrote:
 Stand and fight, Python brothers. Fear not, the Ruby horde!

 From this day to the ending of the world,
   But we in it shall be remember'd;
   We few, we happy few, we band of brothers;
   For he to-day that sheds his blood with me
   Shall be my brother; be he ne'er so vile,
   This day shall gentle his condition:
   And gentlemen in England now a-bed
   Shall think themselves accursed they were not here,
   And hold their manhoods cheap whiles any speaks
   That fought with us upon Saint Crispin's day.


:-)
Oh I say, old chap, steady on -- it's been a long while since
Agincourt; aren't they supposed to be on your side now?
(-:

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


Programming newbie coming from Ruby: a few Python questions

2006-08-01 Thread simonharrison
Hi all. I've been try to learn ruby for a few months but I'm about
ready to give up. The available books either assume a programming
background, or are out of date. Anyway, I think python may suit me more
due to its 'theres one way to do it' philosophy (hope the quote is
right)! Another quote that I liked was:

 'Clever is not considered a compliment in Python.' (don't know where I
read that...)

In Ruby, there are many ways to do the same thing and cleverness seems
to be held in high regard. These attitudes are not too helpful for
beginners in my experience. Anyway, enough waffle.

What books and tutorials are recommended to learn Python? The tutorial
that comes with Python is great and has given me a good overview but I
think I'd benefit from some programming projects, now I have a little
understanding of how Python works.

Ideally, I'd like a whole series of projects where I'm walked through
how to go about writing real Python. The way I look at it, nobody
learnt to build a house just from reading about building materials!

Any other tips for getting up to speed with Python fairly quickly will
be greatly appreciated.

If anyone can help, thanks very much

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


Re: Programming newbie coming from Ruby: a few Python questions

2006-08-01 Thread Ravi Teja
  'Clever is not considered a compliment in Python.' (don't know where I
 read that...)

On a similar note.

Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are, by
definition, not smart enough to debug it.

 -- Brian Kernighan of C

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


Re: Programming newbie coming from Ruby: a few Python questions

2006-08-01 Thread BartlebyScrivener

[EMAIL PROTECTED] wrote:

  'Clever is not considered a compliment in Python.' (don't know where I
 read that...)

To describe something as clever is NOT considered a compliment in the
Python culture.--Alex Martelli, Python Cookbook 2nd Ed. pg. 230 (a
great book for learning by doing, after you have the basics down)

Do you have Python installed yet?

If not, consider

http://www.richarddooling.com/index.php/category/geekophilia.

You sound like a nonprogrammer (except for your Ruby experience), so
you probably want:

http://wiki.python.org/moin/BeginnersGuide/NonProgrammers

Good luck! Have fun.

rd

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


Re: Programming newbie coming from Ruby: a few Python questions

2006-08-01 Thread crystalattice
[EMAIL PROTECTED] wrote:
 Hi all. I've been try to learn ruby for a few months but I'm about
 ready to give up. The available books either assume a programming
 background, or are out of date. Anyway, I think python may suit me more
 due to its 'theres one way to do it' philosophy (hope the quote is
 right)! Another quote that I liked was:

  'Clever is not considered a compliment in Python.' (don't know where I
 read that...)

 In Ruby, there are many ways to do the same thing and cleverness seems
 to be held in high regard. These attitudes are not too helpful for
 beginners in my experience. Anyway, enough waffle.

 What books and tutorials are recommended to learn Python? The tutorial
 that comes with Python is great and has given me a good overview but I
 think I'd benefit from some programming projects, now I have a little
 understanding of how Python works.

 Ideally, I'd like a whole series of projects where I'm walked through
 how to go about writing real Python. The way I look at it, nobody
 learnt to build a house just from reading about building materials!

 Any other tips for getting up to speed with Python fairly quickly will
 be greatly appreciated.

 If anyone can help, thanks very much
Of course there's the O'Reilly set:  Learning Python, Programming
Python, Python in a Nutshell, etc.  I found them great for an overview
and capabilities look at the language, but like you I prefer a more
project-oriented approach.  They are good to have on your reference
shelf though.

The best book I've found for teaching you the language is from Deitel
and Deitel:  Python, How to Program.  It's outdated in that is uses
Python 2.2 but the vast majority of concepts still apply; it does
mention when certain features are deprecated so you shouldn't have a
problem.

It is a college textbook so it goes into detail in many areas plus it
has the usual quizes, chapter summaries, and tests.  The tests are
usually easy enough to figure out but with enough difficulty to make
them challenging.  It covers a wide range of topics, from CGI and XML
to multithreading and networking.

It's normally $90-$100 but you should be able to find it used for $40.

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


Re: Programming newbie coming from Ruby: a few Python questions

2006-08-01 Thread John Salerno
crystalattice wrote:

 Of course there's the O'Reilly set:  Learning Python, Programming
 Python, Python in a Nutshell, etc. 

Yep, Learning Python is the best to start. I haven't tried Programming 
Python yet (new edition soon), and once you understand Python, Python in 
a Nutshell is an excellent reference and also teaches you how a lot of 
things work under the hood.

For plenty of examples and learn by doing, you can check out Dive Into 
Python. And while I don't really recommend Beginning Python to *learn* 
the language, there are 10 projects at the end of the book that you can 
work on once you have a grasp of the language.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Programming newbie coming from Ruby: a few Python questions

2006-08-01 Thread Edmond Dantes
Ravi Teja wrote:

  'Clever is not considered a compliment in Python.' (don't know where I
 read that...)
 
 On a similar note.
 
 Debugging is twice as hard as writing the code in the first place.
 Therefore, if you write the code as cleverly as possible, you are, by
 definition, not smart enough to debug it.
 
  -- Brian Kernighan of C

Well, if you are talking about C, that is *definitely* true. I would think
that would be less the case for languages like Java, Python, PHP, etc.

Of course, it's all what you really mean by clever. To me, being clever
partly means writing code without bugs in the first place, so there is
nothing that needs debugging

Well, if anyone can pull that sword from the stone...!

-- 
-- Edmond Dantes, CMC
And Now for something Completely Different:
  http://bridal-registry.weddingbelljoy.com
  http://3D.CraftyMen.com
  http://lapis.StellarChemistry.com
  http://civil.LesbianGetTogether.com
  http://workstation.funiturenow.com
  http://cosmetics.whitegirlstuff.com
  http://strapless.WomanNightlife.com

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


RE: Programming newbie coming from Ruby: a few Python questions

2006-08-01 Thread Delaney, Timothy (Tim)
Edmond Dantes wrote:

 Of course, it's all what you really mean by clever. To me, being
 clever partly means writing code without bugs in the first place,
 so there is nothing that needs debugging

Clever in this context generally means using a trick/hack that is
non-obvious (often even after you understand it). Cleverness often
leads to difficult-to-understand code, which is contrary to the python
philosophy.

There are occasionally times when cleverness is useful, but in those
cases it should always be commented explaining exactly what it is doing,
and why a non-clever solution was not used. Most of the time there's
still a better non-clever way to do it, but the coder is not clever
enough to find it ;)

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


Re: Programming newbie coming from Ruby: a few Python questions

2006-08-01 Thread gene tani

[EMAIL PROTECTED] wrote:
 Hi all. I've been try to learn ruby for a few months but I'm about
 ready to give up. The available books either assume a programming
 background, or are out of date. Anyway,

http://www.awaretek.com/book.html

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


Re: Programming newbie coming from Ruby: a few Python questions

2006-08-01 Thread Nick Vatamaniuc
For a tutorial  try the Python Tutorial @ http://docs.python.org/tut/

For a book try Learning Python from O'Reilly Press

For reference try the Python library reference  @
http://docs.python.org/lib/lib.html

For another good book  try Dive Into Python @
http://diveintopython.org/
It is a book you can view online or download for free. It is written by
Mark Pilgrim. If you like it, please support the author and buy a
printed copy:
http://www.amazon.com/gp/product/1590593561/ref=nosim/102-5606503-6853720?n=283155

Also take a look at common recipes on how to do things when you get
more used to Python @
http://aspn.activestate.com/ASPN/Cookbook/Python/

Hope this helps,
Nick V.



[EMAIL PROTECTED] wrote:
 Hi all. I've been try to learn ruby for a few months but I'm about
 ready to give up. The available books either assume a programming
 background, or are out of date. Anyway, I think python may suit me more
 due to its 'theres one way to do it' philosophy (hope the quote is
 right)! Another quote that I liked was:

  'Clever is not considered a compliment in Python.' (don't know where I
 read that...)

 In Ruby, there are many ways to do the same thing and cleverness seems
 to be held in high regard. These attitudes are not too helpful for
 beginners in my experience. Anyway, enough waffle.

 What books and tutorials are recommended to learn Python? The tutorial
 that comes with Python is great and has given me a good overview but I
 think I'd benefit from some programming projects, now I have a little
 understanding of how Python works.

 Ideally, I'd like a whole series of projects where I'm walked through
 how to go about writing real Python. The way I look at it, nobody
 learnt to build a house just from reading about building materials!

 Any other tips for getting up to speed with Python fairly quickly will
 be greatly appreciated.
 
 If anyone can help, thanks very much

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


Re: Programming newbie coming from Ruby: a few Python questions

2006-08-01 Thread Luis M. González

Delaney, Timothy (Tim) wrote:
 Edmond Dantes wrote:

  Of course, it's all what you really mean by clever. To me, being
  clever partly means writing code without bugs in the first place,
  so there is nothing that needs debugging

 Clever in this context generally means using a trick/hack that is
 non-obvious (often even after you understand it). Cleverness often
 leads to difficult-to-understand code, which is contrary to the python
 philosophy.

 There are occasionally times when cleverness is useful, but in those
 cases it should always be commented explaining exactly what it is doing,
 and why a non-clever solution was not used. Most of the time there's
 still a better non-clever way to do it, but the coder is not clever
 enough to find it ;)

 Tim Delaney

Is this kind of cleverness what is usually known as magic?
I suspect that this has something to do with it, but not completely
sure...

Luis

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