Staging
v0.5.1
https://github.com/python/cpython
Revision 9fd41e363b4780ae9af475f9c23c0a3cf69d70ad authored by Guido van Rossum on 29 December 1997, 19:59:33 UTC, committed by Guido van Rossum on 29 December 1997, 19:59:33 UTC
 *  The invoke methods of the three Tkinter widgets Button,
    Checkbutton and Radiobutton should return the value returned by
    the callback, (like the Menu widget does):

	def invoke(self):
	    return self.tk.call(self._w, 'invoke')

 *  The select_from method of the Canvas widget should use 'from', not
    'set':

	def select_from(self, tagOrId, index):
	    self.tk.call(self._w, 'select', 'from', tagOrId, index)

    Currently, if you use select_from, you get the error message:
 'TclError: bad select option "set": must be adjust, clear, from, item, or to'

 *  The 'entrycget' and 'type' methods of the Tk menu widget are
    missing from Tkinter.

 *  There is a bug in grid_columnconfigure and grid_rowconfigure.  For
    example, this should return the current value of the 'minsize'
    option for column 0:

	f.grid_columnconfigure(0, 'minsize')

    Instead it returns the same as:

	f.grid_columnconfigure(0)

    I suggest that the hint given in the comment in the
    Tkinter.Misc.configure method should be followed - "ought to
    generalize this so tag_config etc.  can use it".  Repeating the
    same configure code several times in Tkinter is inviting errors.
    [I did not follow this advice --G]

 *  The grid_slaves method should handle options.  Currently, to pass
    options to the grid_slaves method, you have to do something like:

	grid_slaves('-row', 1)
1 parent 23e21e7
Raw File
Tip revision: 9fd41e363b4780ae9af475f9c23c0a3cf69d70ad authored by Guido van Rossum on 29 December 1997, 19:59:33 UTC
Fixed several bugs reported by Greg McFarmane:
Tip revision: 9fd41e3
BLURB.LUTZ
Newsgroups: comp.lang.perl,comp.lang.tcl
From: lutz@xvt.com (Mark Lutz)
Subject: Python (was Re: Has anyone done a tk addition to perl?)
Organization: XVT Software Inc.
Date: Thu, 14 Oct 1993 17:10:37 GMT
X-Disclaimer: The views expressed in this message are those of an
	individual at XVT Software Inc., and do not necessarily
	reflect those of the company.


I've gotten a number of requests for information about Python,
since my post here earlier this week.  Since this appears to be 
of general interest, and since there's no python news group yet, 
I'm posting a description here.  I'm not the best authority on 
the language, but here's my take on it.  

[TCL/Perl zealots: this is informational only; I'm not trying to
'convert' anybody, and don't have time for a language war :-)
There is a paper comparing TCL/Perl/Python/Emacs-Lisp, which is
referenced in the comp.lang.misc faq, I beleive.]


What is Python?...

Python is a relatively new very-high-level language developed 
in Amsterdam.  Python is a simple, procedural language, with 
features taken from ABC, Icon, Modula-3, and C/C++.

It's central goal is to provide the best of both worlds: 
the dynamic nature of scripting languages like Perl/TCL/REXX, 
but also support for general programming found in the more 
traditional languages like Icon, C, Modula,...

As such, it can function as a scripting/extension language,
as a rapid prototyping language, and as a serious software
development language.  Python is suitable for fast development
of large programs, but also does well at throw-away shell coding.

Python resembles other scripting languages a number of ways:
    - dynamic, interpretive, interactive nature
    - no explicit compile or link steps needed
    - no type declarations (it's dynamically typed)
    - high-level operators ('in', concatenation, etc)
    - automatic memory allocation/deallocation (no 'pointers')
    - high level objects: lists, tuples, strings, associative arrays
    - programs can construct and execute program code using strings
    - very fast edit/compile/run cycle; no static linking
    - well-defined interface to and from C functions and data
    - well-defined ways to add C modules to the system and language

Python's features that make it useful for serious programming:
    - it's object-oriented;  it has a simplified subset of 
      C++'s 'class' facility, made more useful by python's
      dynamic typing;  the language is object-oriented from
      the ground up (rather than being an add-on, as in C++)

    - it supports modules (imported packages, as in Modula-3);
      modules replace C's 'include' files and linking, and allow
      for multiple-module systems, code sharing, etc.;

    - it has a good exception handling system (a 'try' statement,
      and a 'raise' statement, with user-defined exceptions);

    - it's orthogonal;  everything is a first-class object in the
      language (functions, modules, classes, class instance methods...)
      and can be assigned/passed and used generically;

    - it's fairly run-time secure;  it does many run-time checks
      like index-out-of-bounds, etc., that C usually doesn't;

    - it has general data structuring support;  Python lists are
      heterogeneous, variable length, nestable, support slicing, 
      concatenation, etc., and come into existance and are reclaimed 
      automatically;  strings and dictionaries are similarly general;

    - it's got a symbolic debugger and profiler (written in python, 
      of course..), and an interactive command-line interface;
      as in Lisp, you can enter code and test functions in isolation,
      from the interactive command line (even linked C functions);

    - it has a large library of built-in modules;  it has support
      for sockets, regular expressions, posix bindings, etc.

    - it supports dynamic loading of C modules on many platforms;

    - it has a _readable_ syntax;  python code looks like normal
      programming languages;  tcl and perl can be very unreadable
      (IMHO; what was that joke about Perl looking the same after
      rot13..);  python's syntax is simple, and statement based;


Of course, Python isn't perfect, but it's a good compromise betweem
scripting languages and traditional ones, and so is widely applicable. 
'Perfect' languages aren't always useful for real-world tasks (Prolog, 
for example), and languages at either extreme are not useful in the other 
domain (C is poor for shell coding and prototyping, and awk is useless 
for large systems design; Python does both well).  

For example, I've used Python successfully for a 4K line expert system 
shell project; it would have been at least twice as large in C, and would 
have been very difficult in TCL or Perl.

Python uses an indentation-based syntax which may seem unusual at first
to C coders, but after using it I have found it to be _very_ handy, since 
there's less to type.  [I now forget to type '}' in my C code, and am 
busy calculating how much time I wasted typing all those '}', 'END', etc., 
just to pander to 'brain-dead' C/Pascal compilers :-)].

Python's currently at release 0.9.9.  It seems suprisingly stable.
The first 'official' 1.0 release is due out by the end of this year.
Python runs on most popular machines/systems (mac, dos, unix, etc.)
It's public domain and distributable, and can be had via ftp.  The 
distribution includes examples, tutorials, and documentation.   The 
latest ftp address I have (I got it on a cd-rom):
    pub/python/*  at  ftp.cwi.nl
    pub/?         at  wuarchive.wustl.edu   (in america)

There's a python mailing list maintained by the language's creator.  
Mail 'python-list-request@cwi.nl' to get on it.  

Mark Lutz
lutz@xvt.com
back to top