Write Python like a Python programmer (was: A design problem)



"Gabriel Genellina" <gagsl-py2@xxxxxxxxxxxx> writes:

En Thu, 31 Jan 2008 01:57:41 -0200, Dan Upton <upton@xxxxxxxxxxxx>
escribió:

Or: How to write Python like a Python programmer, not a Java
programmer. This will be a little long-winded...

So I just recently started picking up Python, mostly learning the new
bits I need via Google and otherwise cobbling together the functions
I've already written. It occurred to me though that one of my
programs was still probably written very much like I would in Java
(part of the reason I'm picking up Python is I'm tired of my coworkers
making fun of me for writing parsing/reformatting programs in Java).

Maybe you've already read this, but I'll post the links anyway:
http://dirtsimple.org/2004/12/python-is-not-java.html
http://dirtsimple.org/2004/12/java-is-not-python-either.html

Also, for someone "learning the new bits I needed via Google", try
these:

The Python tutorial
<URL:http://www.python.org/doc/tut/>

Python anti-pitfalls
<URL:http://mechanicalcat.net/cgi-bin/log/2003/09/02>

As for "write Python like a Python programmer", this:

Code Like a Pythonista: Idiomatic Python
<URL:http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html>

--
\ "I bought a self learning record to learn Spanish. I turned it |
`\ on and went to sleep; the record got stuck. The next day I |
_o__) could only stutter in Spanish." —Steven Wright |
Ben Finney
.



Relevant Pages

  • Re: Python or PHP?
    ... If it's one of the things for which Python ... every language here and there more ways to do something. ... you make Perl more complicated than it is:-D. ... Not the programmer. ...
    (comp.lang.python)
  • Re: Attack a sacred Python Cow
    ... Prove that implicit self is a good idea -- ... The issue here has nothing to do with the inner workings of the Python ... needs to be supplied by the programmer. ... It just occurred to me that Python could allow the ".member" access ...
    (comp.lang.python)
  • Re: Is python worth learning as a second language?
    ... I am a C++ programmer and I am thinking of learning something else because I know second language might be very helpful somehow. ... heard a few positive things about Python but I have never writen any single line in python so I do not know this language at all. ...
    (comp.lang.python)
  • Re: True inconsistency in Python
    ... >Explicit comparison with the true constant ... In most languages (including Python), ... Now of course any idiot C programmer knows that these two are ...
    (comp.lang.python)
  • Re: Finding installed package files
    ... >contains links to the most important information about the installation. ... >programmer IDE projects and/or whatever. ... There are 23 packages on this system whose name begins with a 'g'. ... >small graphical program which searches Python module information from the ...
    (alt.os.linux.redhat)