




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Assignment; Professor: Lyle; Class: Programming Languages; Subject: CSC Computer Science; University: Murray State University; Term: Unknown 2008;
Typology: Assignments
1 / 8
This page cannot be seen from the preview
Don't miss anything!





Derek Adams CSC 415 Bill Lyle Python History Python was created by Guido von Rossum in 1990. He named the language not after the snake, but after the British comedy show Monty Python’s Flying Circus. (python homepage). Von Rossum designed the language to be a successor to the ABC programming language that was able to perform exception handling. Python is often compared to TCL, Perl, Ruby, and Java. (python) In 2000, the core development team went to BeOpen.com from CNRI, where von Rossum went soon after he created python. At BeOpen.com, they stayed for only the 2. release of the language. The team then went on to join with Digital Creations, where they now reside and continue to release 2.x versions of the language and will soon start the 3. version of python. (python wiki). Overview Names, Bindings, Type Checking, and Scopes The only naming thing to python is that it is a case sensitive language. Thus, “Number” is not the same as “number.”
Python uses duck typing, where the programmer does not need to define what a variable is when they declare it. Python figures out what kind of variable it is and figures out in what ways it can be used and how it cannot be used. Python is a strongly typed language, so someone cannot add a number to a string, despite not enforcing static typing. (python programing). Python is a statically scoped language. It supports every scope level from global to blocks. Data Types Python supports all of the basic data types. For numbers, python has integers, long integers (which has no limit the the number of digits in the number), floats, and complex numbers, often used in physics to describe motion in different axises. These data types form a hierarchy for mathematical operations. So, if an integer was divided by a float, python would upgrade the integer variable to a float and carry out the division. Python also gives support for string variables. Python still treats a sting as a kind of array for proposes of indexing. A neat little feature that python adds to strings is the ability to index a string from the end by using negative numbers. For example, a variable named example contains ‘string’ could access the letter ‘g’ either by example[6] or example[-1]. Python includes the ability to use lists in several different forms. The standard list type is an order group of items that do not have to be of the same type. So a list could contain integers and strings to form someone’s address.
Object Oriented, Abstract Data Types, and Encapsulation Python offers the choice of using the object-oriented style of programming, but does not force programmers use it like some other languages. Python make use of the inheritance ability to keep programmers from having to type the same lines of code over and over again.. Abstract data type are done in classes and can make use of inheritance to make several different data types, such as cars and animals, with very little code. There is no way to enforce encapsulation since python allows access to every part of a class. Like most object oriented languages, a subprogram is just a function. Threads and Concurancy Python would not be a good choice of a language to use if a programmer is going to be dealing with several different threads. Python does support concurrency in threads, but it tends to break down when more threads are added or when dealing with multiple CPUs. (python programing). If a programmer was determined to use python in a program that was thread heavy, the smart thing do to would be to use a language like C# to do all of the thread work, then let the python code do the rest of the job.
Exception Handling and event handling The exception handling in python is just like that of any other language. Python uses the standard try/catch block to handle any exception that the programmer might expect to happen. Event handling in python is not as easy as some of the other languages, such as C#. There are several different ways to handle different events, each one a little more confusing that the last. These problems are expected to be reduced as newer versions of python are released. Other Issues Python uses whitespace to define blocks of code instead of the normal brackets. This enhances the readability of the code, but it makes using tabs and spaces a little trickier. Something that was quite interesting with python is the fact that it can be used to enhance C++, C#, and Java code. This ability makes python quite versatile since it can help strengthen some things that the other languages can be a bit lacking in. Vise versa, C++, C#, and Java can help python code boost its ability to do things that is not the best, such as threading. Review of Python Readability and Writeability
With the expansive online community, there are many different modules and code that has already been tested and proven reliable. Cost Python is completely free. Python can be downloaded from many different sources. With its able it augment code from different languages, it is nice to know and boost the effectiveness of any given program, saving both time and money. Since Python is like coding in pseudo code, testing experimental strands of code is quite easy. If something does not work, the answer to the problem is, most likely, just a Google search away. If Google fails, a programmer can go to any one of the countless forums dedicated to python to ask for help and gain the knowledge of many different python programmers with many different points of view do fine the best solution to a problem.
Works Cited Page "Python (programming language)"
Python home page "Python Programming"