Re: learning python idioms

2006-06-11 Thread James Stroud
[EMAIL PROTECTED] wrote:
> After several years developing in Java, I've begun to switch to Python
> for several of my new projects as I have found the language quite
> interesting.  I've read several tutorials and implemented a few sample
> programs and I've found that Python enables one to program in a variety
> of different styles (I'm not sure if this was the original intention or
> not).  Thus, I find myself occaisionally slipping into the "Java"
> mindset when writing Python code and I wonder if this is not optimal.
> Python is not Java and there must be more "correct" ways of doing this
> in Python that simply writing Java code with different syntax.  Is
> there a good reference on the internet about Python-specific idioms and
> just good Python style in general.  Which language constructs are
> efficient and which aren't?
> 
> Thanks in advance,
> Ben
> 

As an experiment, I googled 'python idioms' and got a few good hits 
right at the top. I probably should have done this a long time ago.

James








-- 
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095

http://www.jamesstroud.com/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: learning python idioms

2006-06-11 Thread bayerj
> yup, you could spend weeks reading the Language Wars:

Actually, that link is not about language wars. It's about making the
switch from java to python. Nothing more, nothing less.

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


Re: learning python idioms

2006-06-11 Thread gene tani

bayerj wrote:
> Hi,
>
> If you switched from java to python the best point to start is
> http://dirtsimple.org/2004/12/python-is-not-java.html.
>
> Greets,
> -Justin

yup, you could spend weeks reading the Language Wars:

http://www.google.com/search?hl=en&q=site%3Aartima.com+java+python&btnG=Google+Search

http://del.icio.us/tag/python+java

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


Re: learning python idioms

2006-06-11 Thread gene tani

[EMAIL PROTECTED] wrote:
> After several years developing in Java, I've begun to switch to Python
> for several of my new projects as I have found the language quite
> interesting.  I've read several tutorials and implemented a few sample
> programs and I've found that Python enables one to program in a variety
> of different styles (I'm not sure if this was the original intention or
> not).  Thus, I find myself occaisionally slipping into the "Java"

i googled "Python idioms":

http://www.gungfu.de/facts/wiki/Main/PythonIdioms

also look at the OReilly Python cookbook and the online repository it's
based on
http://aspn.activestate.com/ASPN/Cookbook/Python

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


Re: learning python idioms

2006-06-11 Thread bayerj
Hi,

If you switched from java to python the best point to start is
http://dirtsimple.org/2004/12/python-is-not-java.html.

Greets,
-Justin

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


Re: learning python idioms

2006-06-10 Thread vbgunz
> After several years developing in Java, I've begun to switch to Python
> for several of my new projects as I have found the language quite
> interesting.  I've read several tutorials and implemented a few sample
> programs and I've found that Python enables one to program in a variety
> of different styles (I'm not sure if this was the original intention or
> not).  Thus, I find myself occaisionally slipping into the "Java"
> mindset when writing Python code and I wonder if this is not optimal.
> Python is not Java and there must be more "correct" ways of doing this
> in Python that simply writing Java code with different syntax.  Is
> there a good reference on the internet about Python-specific idioms and
> just good Python style in general.  Which language constructs are
> efficient and which aren't?

I completely agree with this. I wish some people would gather and
create a site dedicated to efficient Python idioms. This would be truly
awesome! I hope you get good news on this!

http://vbgunz.blogspot.com

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


learning python idioms

2006-06-10 Thread conkerll
After several years developing in Java, I've begun to switch to Python
for several of my new projects as I have found the language quite
interesting.  I've read several tutorials and implemented a few sample
programs and I've found that Python enables one to program in a variety
of different styles (I'm not sure if this was the original intention or
not).  Thus, I find myself occaisionally slipping into the "Java"
mindset when writing Python code and I wonder if this is not optimal.
Python is not Java and there must be more "correct" ways of doing this
in Python that simply writing Java code with different syntax.  Is
there a good reference on the internet about Python-specific idioms and
just good Python style in general.  Which language constructs are
efficient and which aren't?

Thanks in advance,
Ben

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