What is unique about Python?

Szabolcs Nagy nszabolcs at gmail.com
Sun Dec 25 06:01:20 CET 2005

>> identation
>Feh.  A red herring.  At best, syntactic sugar.  At worst, something for
>potential adopters to get hung up about.
i always ident my code, but in python i don't need to bother with the
{} and the ; (which is redundant if i ident anyway) so i like it
because i need to type less, and i can read other's code (because of
the same layout).

>> lightweight oo (no public/protected/private)
>This one is debatable.  This is value in private data (and methods).
>Fortunately, Python does let you make things private with the
>double-underscore syntax.
i like it because i need to type (and think) less. When i need to make
it clear, which method is private/protected, i can always add a '_' or
'__' prefix by convention.

>> built-in types (list, dict, str have useful methods)
>Python does come with a good assortment of built-in types and containers,
>but most languages these days come with pretty much the same assortment.
python has very few built-in types and these are powerful. C++ stl or
java.util has more data structures but those are somewhat less usable.
Other languages with the same bult-in data types (thinking about perl,
php, ruby) always have a little bit differrent behaviour and i always
happen to prefer the python way. (nothing can beat python's list +
slicing or the ease of creating a dict).

More information about the Python-list mailing list