which feature of python do you like most?

Z

zelzel.zsu

which feature of python do you like most?

I've heard from people that python is very useful.
Many people switch from perl to python because they like it more.

I am quite familiar with perl, I've don't lots of code in perl.
Now, I was curious and interested in the python people.
They certainly made their best choice from perl to python.

but i have no interesting python experence before, thought i've read a
few chapters
of a python tutorial book. The things are much like the perl one.

I have no idea why people are so facinating with python.
So I post this question: What do you use in your dairy work with
python?
what is the thing that python makes you happy?


I certainly don't want to miss a language if it's so great!
can anyone share your happy experence with python?
 
B

Benji York

I have no idea why people are so facinating with python.
So I post this question: What do you use in your dairy work with
python?

I can't imagine why you're confused.
 
M

Michele Simionato

which feature of python do you like most?

It makes easy things easy, while keeping hard things possible.
 
B

bruno at modulix

which feature of python do you like most?

I've heard from people that python is very useful.
Many people switch from perl to python because they like it more.

I am quite familiar with perl, I've don't lots of code in perl.
Now, I was curious and interested in the python people.
They certainly made their best choice from perl to python.

but i have no interesting python experence before, thought i've read a
few chapters
of a python tutorial book. The things are much like the perl one.

I have no idea why people are so facinating with python.

So I post this question: What do you use in your dairy work with
python?

Err... Python ?-)
what is the thing that python makes you happy?

readability, expressivity, simplicity. And also everything-is-an-object.
And also list comprehensions. And also iterators and generators. And
also properties, descriptors and metaclasses. And also anonymous
functions, callable objects and decorators. And the librairies too. And
a lot of other things, in fact...
I certainly don't want to miss a language if it's so great!
can anyone share your happy experence with python?

Just install Python and use it, and you'll share our happy experience !-)
 
G

George Sakkis

[snipped]

i've read a few chapters of a python tutorial book. The things are much like the perl one.

I have no idea why people are so facinating with python.

Because they can write a program or module longer than 100 lines and be
actually able to read, debug, refactor or extend it after 6 months.

George
 
T

Thomas Guettler

Am Tue, 08 Nov 2005 04:21:52 -0800 schrieb (e-mail address removed):
which feature of python do you like most?

I've heard from people that python is very useful.
Many people switch from perl to python because they like it more.

It gives you a stacktrace if something is wrong. Exceptions are built-in.

Example:
Perl:
open FD "myfile.txt" || or die "Can't open file $!";

Python:
fd=open("myfile.txt")

If the file can't be opened, then you get a nice traceback.

If you are programming/debugging cgi with cgitb you can even get a HTML
page full of important information.

Example:
http://www.thomas-guettler.de/vortraege/python/cgitb.html

I have a page why I switched from perl to python, but it is in german:

http://www.thomas-guettler.de/vortraege/programmierung/einfuehrung.html#link_5


Objectoriented Programming in Perl is no fun. I switched from perl to
python because the emacs-perl mode was not able to understand all
those backslashed anymore (the code was correct).


Regards,
Thomas
 
A

Alex Stapleton

which feature of python do you like most?

I think this question might be a bit like asking whether you love
your mum or your dad most to a lot of people ;)

People like Python as a whole usually. It's not like C++ or PHP or
anything where it's generally usable and occasionally pisses you off.
It's tends to just work as you expect it to most of the time once
you've got your head around the basics. That or Python enthusiasts
are just smarter than everyone else......
 
P

Paul Rubin

Alex Stapleton said:
People like Python as a whole usually. It's not like C++ or PHP or
anything where it's generally usable and occasionally pisses you off.

As somebody once said about Lisp, "you can feel the bits between your toes".
 
S

Sion Arrowsmith

which feature of python do you like most?

A different thing every time I encounter the corresponding misfeature
in another language. But a lot of it boils down to the cleanliness of
syntax when handling complex datastructures aggregated from basic
types, especially for use of functions(/bound methods) as first class
objects and the ease of iterating over collections. And much of the
rest is not having to jump through the hoops and boilerplate of static
typing.
 
L

Luis M. Gonzalez

I've never used Perl, but I know other c-like laguages, and I can tell
you what I like about python:

- It is concise, clear and to the point.
- No useless characters like curly braces and semicolons cluttering it
syntax,.
- Very readable and elegant.
- One obvious way to do each task, not thousands (easier to learn,
easier to remember), and this way is shorter, easier and more
straightforward than any other.
- Great built-in data structures.
- And all of its features, but very specially, list comprehensions and
slicing. I can't live without them!
 
J

Jeffrey Schwab

which feature of python do you like most?

I've heard from people that python is very useful.
Many people switch from perl to python because they like it more.

I am quite familiar with perl, I've don't lots of code in perl.
Now, I was curious and interested in the python people.
They certainly made their best choice from perl to python.

but i have no interesting python experence before, thought i've read a
few chapters
of a python tutorial book. The things are much like the perl one.

I have no idea why people are so facinating with python.
So I post this question: What do you use in your dairy work with
python?
what is the thing that python makes you happy?


I certainly don't want to miss a language if it's so great!
can anyone share your happy experence with python?

I love Perl. I have started using Python more, partially because it's
in vogue, but largely because hastily written code seems to come out
"cleaner." One certainly can write clear, maintainable code in Perl,
but doing so in Python feels a bit more natural. For example:

- Object orientation was a design goal of Python, but had to
be retrofitted onto Perl.

- Every module I write in Perl contains:

use warnings; # Should have been the default.
use strict; # Check for dubious constructs.

# Probably some export code like this:
our @ISA = qw( Exporter );
our @EXPORT_OK = (
# ...
);

# "Real" code.
# ...

1 # Return good value on import.

In Python, none of this is necessary.

- Python knows what indentation means, so I get to skip a
lot of curly braces.


For one-liners, I still use Perl, specifically because:

- I don't have to import "os" and "sys" modules just
to basic tasks like issuing system commands.

- Perl will auto-vivify variables with reasonable
default values. E.g., if I ++$count, Perl has
enough intuition to know that I wanted $count
initialized to zero.

- Perl lets me use very clean syntax for subroutine
invocation, e.g. by skipping parentheses and being
aware of (list or scalar) context.

Hope this helps.
 
M

mensanator

which feature of python do you like most?

I've heard from people that python is very useful.
Many people switch from perl to python because they like it more.

I am quite familiar with perl, I've don't lots of code in perl.
Now, I was curious and interested in the python people.
They certainly made their best choice from perl to python.

but i have no interesting python experence before, thought i've read a
few chapters
of a python tutorial book. The things are much like the perl one.

I have no idea why people are so facinating with python.
So I post this question: What do you use in your dairy work with
python?
what is the thing that python makes you happy?


I certainly don't want to miss a language if it's so great!
can anyone share your happy experence with python?

Big Arithmetic. I switched from perl to Python when I heard it had
built-in
support for unlimited precision integers. Sure, I found out later that
perl
has a Big Arithmetic module, but I had already been converted to Python
which also has the gmpy module (the Gnu Multiple Precision library).
Python/gmpy is a pretty hard combination to beat. You can get better
performance with c and GMP, but c is a low-level language.

I even compared it to Java and its Big Arithmetic module. Python/gmpy
can actually outperform Java as the problem/operators get very large
(when most of the time in the Python program is spent in the gmpy
module
which is compiled c code).

I've toyed with REXX (ridiculously slow), UBASIC (ugh, and precision
limited to 3000 digits, woefully inadequate for my needs), Java (see
above)
and Scheme (alien, and implementations suck). I haven't found anything
yet that combines the ease of programming with the power I need to make
me switch from Python.
 
M

Micah Elliott

What do you use in your dairy work with python?

Cows hate snakes!
which feature of python do you like most?

Various success stories:
http://pythonology.org/success

Eric Raymond:
http://pythonology.org/success&story=esr

Bruce Eckel:
http://www.artima.com/intv/aboutme.html
(and see follow-on conversations)

Wingware (nice list):
http://wingware.com/python/benefits

Kevin Altis' link collection:
http://altis.pycs.net/stories/2003/04/16/whatIsPythonAndWhyPython.html

If Python doesn't already maintain an official "list of benefits",
maybe it should. Probably many in this group have a personal laundry
list. Here's mine:

- Interactive interpreter for various testing of expressions before
inserting into actual source code file.

- Built-in types have powerful default functionality.

- Portability via virtual machine. No need to build for multiple
architectures/platforms. And already installed on any platform
worth caring about.

- Can write code at many levels of quality: robust (using classes,
exceptions, data protection, etc.) or rapid (a script with no
hierarchical constructs). Scales very well for large projects.

- No proprietary lock-in.

- Libraries such as optparse, logging, ply, etc. allow for reusable
components in very few lines of code.

- Automatic memory management.

- Lack of static typing.

- Built-in documentation/help system.

- Adheres to UNIX philosophy.

- Intuitive process management.

- Robust/powerful regular expression engine.

- Syntax is very clean and readable/maintainable: executable
pseudocode. Language is compact; can hold entire language in head:
idioms and library routines. Only a couple books required to be
completely up-to-speed on language.

- Strong integration with other languages (even though I don't use
this... yet).

- Ease of introspection/meta-programming.

- Fast GUI building.

- Only one (sometimes two) way to do things right.

- Rapid creation of unit tests (pyunit, doctest, hybrid).

- Very simple exception handling (automatic propagation) makes usage
more common, manageable.

- String-handling features better than other languages.

- Many fewer lines of code necessary to accomplish a task than with
other languages.

- Very supportive and active community.
 
J

James

Most of the responses are of the "Why Python is more pleasant than C++"
variety, but the original poster specifically said he had experience
with Perl. As such, arguments like "automatic memory management" don't
carry any weight.
From my experience as both a Perl and Python user--and I do prefer Perl
for many tasks--the big win for Python is when you have complex data
structures: dictionaries containing arrays, arrays of arrays, array of
dictionaries, and so on. This kind of thing is awkward in Perl (you
need to use references), but perfectly natural and obvious in Python.
 
P

Pierre Quentel

(e-mail address removed) a écrit :
what is the thing that python makes you happy?

I discovered Python 5 years ago and I remember very well that what
attracted me first was indentation. I had learnt JavaScript and
rudiments of Java and couldn't decide on a consistent way of indenting
my code, so it looked rather ugly and difficult to read. The first
Python programs I saw struck me for the beauty of their graphical design
(the use of lowercase letters also counts)

As a learned the language itself I was attracted for the same reasons as
the ones already given (simplicity, built-in types, list
comprehensions...), but I still feel the same aesthetic pleasure every
time I open a Python program to work on it

Pierre
 
M

Mike Meyer

James said:
Most of the responses are of the "Why Python is more pleasant than C++"
variety, but the original poster specifically said he had experience
with Perl. As such, arguments like "automatic memory management" don't
carry any weight.

for many tasks--the big win for Python is when you have complex data
structures: dictionaries containing arrays, arrays of arrays, array of
dictionaries, and so on. This kind of thing is awkward in Perl (you
need to use references), but perfectly natural and obvious in Python.

Further, when operators use those structures, all they really care
about is the API. You can create your own classes with those APIs, and
plug them in (almost) anywhere the the builtin types are used. The
APIs and how to create them is well-documented, and the distribution
ships with example of several of the types.

Making a user class work anywhere you can put a mapping in Perl is
deep magic, but easy in Python. Creating types that act like files and
can be used wherever a file is used is SOP in Python; I'm not even
sure it's possible in Perl (probably is, but it's again deep magic).

<mike
 
B

Bengt Richter

On 8 Nov 2005 04:21:52 -0800 said:
I have no idea why people are so facinating with python.
So I post this question: What do you use in your dairy work with
python?
I don't do dairy work, but I imagine big snakes around cows
might not be good for production.

Regards,
Bengt Richter
 
R

Ron Adam

which feature of python do you like most?

I've heard from people that python is very useful.
Many people switch from perl to python because they like it more.

I am quite familiar with perl, I've don't lots of code in perl.
Now, I was curious and interested in the python people.
They certainly made their best choice from perl to python.

I wrote a few programs in perl that I thought were quite nice. I loved
the flexibility and powerful expressions. But then when I went back to
those programs several months later, I couldn't (easily) figure out what
I did. That was enough to turn me off of perl.
but i have no interesting python experence before, thought i've read a
few chapters
of a python tutorial book. The things are much like the perl one.

I have no idea why people are so facinating with python.
So I post this question: What do you use in your dairy work with
python?
what is the thing that python makes you happy?

What I like most about Python is how many times the best way to solve a
problem turns out to be how I thought of doing it in the first place.

For example, instead of using index's and arrays and defining structures
for handling data, I can usually just iterate through a list of stuff
and make changes as I go. Which is most likely how .... see above. ;-)
 
J

jmdeschamps

James said:
Most of the responses are of the "Why Python is more pleasant than C++"
variety, but the original poster specifically said he had experience
with Perl. As such, arguments like "automatic memory management" don't
carry any weight.

for many tasks--the big win for Python is when you have complex data
structures: dictionaries containing arrays, arrays of arrays, array of
dictionaries, and so on. This kind of thing is awkward in Perl (you
need to use references), but perfectly natural and obvious in Python.

Well, I didn't know Perl when I was asked to teach a Web development
class. I had heard that Perl was CGI standard... So I started to do
some Perl and was aghast at what I needed to learn (I don't like
special caracters that make code look like martian poetry). Then I read
some articles pertaining to Python and CGI and look up that language (I
had read a comment by a Java-C++ Guru, favorable to Python).

Wow, I understood everything I was reading, and I could think of how
other things might work, and by god, they did very often. Like some
others have said elsewhere: Python fitted my brain! That's what made it
special for me! and it still feel like this to this day!

I hope it works for you, if not maybe some other one will (Ruby, Lua,
Haskell, O'Caml, C# ;-) )




Never looked back since...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top