Python
  Home arrow Python arrow Page 2 - Python 101 (part 1): Snake Eyes
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
Google.com  
PYTHON

Python 101 (part 1): Snake Eyes
By: Vikram Vaswani, (c) Melonfire
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 15
    2001-05-29


    Table of Contents:
  • Python 101 (part 1): Snake Eyes
  • The Jedi Master Speaks
  • Start It Up
  • Dissecting A Python...Program
  • Milk And Toast And Honey
  • Adding Things Up

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Python 101 (part 1): Snake Eyes - The Jedi Master Speaks
    ( Page 2 of 6 )

    Some of Python's most powerful features include:

    Object-oriented framework: Built from the ground up as an object-oriented language, Python provides built-in constructs that make it simple for developers to structure code for maximum reusability. Python's "dynamic typing", which automatically recognizes objects like numbers, strings and lists, and negates the need to declare variable types and sizes, offers an advantage not found in languages like C or Java, while automatic memory allocation and management, together with a vast array of pluggable libraries and high-level abstractions, complete the picture.

    Extensibility: Python makes it easy to add new capabilities to your code, by importing specialized libraries into your program. A large number of pre-built libraries ship with the standard Python distribution, and more are available free of charge on the Web. Additionally, Python also allows you to compile new "extension modules" for additional functionality, or to improve performance.

    Portability: Python distributions are available for a wide variety of operating systems, including Windows, Macintosh, Amiga and most flavours of UNIX, including Linux. This portability ensures that code written on one platform will work on others with zero or minimal changes required. In case a distribution isn't available for a specific platform, you can even download the source code and compile it yourself!

    Readability: Python's clear and elegant syntax, and emphasis on proper indentation of code blocks, improves code readability, making it easier to understand code a year later. By imposing lexical and syntactical rules on language constructs, Python reduces the time spent on understanding (and developing) application logic, and also makes program code easier to maintain over time.

    Performance: There's an interesting piece of trivia geeks should be aware of here. Python is an odd hybrid of compiled and interpreted languages: the code you write is first converted to so-called "bytecode" and then executed by the Python interpreter. Since executing bytecode is faster than interpreting statements line-by-line, Python offers a substantial performance advantage of other interpreted languages. It should be noted, however, that the conversion to bytecode is handled internally by Python, and is not visible to the end user.

    Open licensing model: Like Perl and PHP, Python is available for free, to anyone who wants it, over the Internet, in both source and binary form. Users may use and distribute it without restriction, and even charge a fee for it if they so desire.

    Programmers love to debate the virtues of different programming languages, and it's no different here. However, Python comes off favourably in most of these comparisons. You can find detailed evaluations of Python versus other programming languages at http://www.python.org/doc/Comparisons.html. And you might want to take a minute to enjoy this nugget culled from the Python humour pages at http://www.python.org/doc/Humor.html

    EXTERIOR: DAGOBAH -- DAY

    With Yoda strapped to his back, Luke climbs up one of the many thick vines that grow in the swamp until he reaches the Dagobah statistics lab. Panting heavily, he continues his exercises -- grepping, installing new packages, logging in as root, and writing replacements for two-year-old shell scripts in Python.

    YODA: Code! Yes. A programmer's strength flows from code maintainability. But beware of Perl. Terse syntax...more than one way to do it...default variables. The dark side of code maintainability are they. Easily they flow, quick to join you when code you write. If once you start down the dark path, forever will it dominate your destiny, consume you it will.

    LUKE: Is Perl better than Python?

    YODA: No... no... no. Quicker, easier, more seductive.

    LUKE: But how will I know why Python is better than Perl?

    YODA: You will know. When your code you try to read six months from now.

     
     
    >>> More Python Articles          >>> More By Vikram Vaswani, (c) Melonfire
     

       

    PYTHON ARTICLES

    - Tuples and Other Python Object Types
    - The Dictionary Python Object Type
    - String and List Python Object Types
    - Introducing Python Object Types
    - Mobile Programming using PyS60: Advanced UI ...
    - Nested Functions in Python
    - Python Parameters, Functions and Arguments
    - Python Statements and Functions
    - Statements and Iterators in Python
    - Sequences and Sets in Python
    - Python Expressions and Operators
    - Dictionaries, Variables and Statements in Py...
    - Data Types in Python
    - The Python Language
    - SSH with Twisted





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek