[Python-Dev] python-dev Summary for 2005-01-01 through 2005-01-15 [draft]

Brett C. bac at OCF.Berkeley.EDU
Fri Feb 4 02:39:39 CET 2005


Wow, another summary out the same week as the previous one!  Perk of keeping 
things short and to the point.  Then again keeping them this simple and short 
begs the question of whether the summaries are worth it still at that point.

Regardless, probably will send this one out Saturday or Sunday so corrections 
need to get in by then.

-------------------------------------

=====================
Summary Announcements
=====================
PyCon_ will be upon us come late March!  Still time to plan to go.

A warning on the thoroughness off this summary is in order.  While trying to 
delete a single thread of email I managed to accidentally delete my entire 
python-dev mailbox.  I did the best I could to retrieve the emails but it's 
possible I didn't resuscitate all of my emails, so I may have overlooked something.

.. _PyCon: http://www.pycon.org/

=======
Summary
=======
-------------
PEP movements
-------------
.. tip:: PEP updates by email are available as a topic from the 
`Python-checkins`_ mailing list.

`PEP 246`_ was a major topic of discussion during the time period covered by 
this summary.  This all stemmed from `Guido's blog`_ entries on optional type 
checking. This led to a huge discussion on many aspects of protocols, 
interfaces, and adaptation and the broadening of this author's vocabulary to 
include "Liskov violation".

"Monkey typing" also became a new term to know thanks to Phillip J. Eby's 
proto-PEP on the topic (found at 
http://peak.telecommunity.com/DevCenter/MonkeyTyping).  Stemming from the 
phrase "monkey see, monkey do", it's Phillip version of taking PEP 246 
logically farther (I think; the whole thing is more than my currently 
burned-out-on-school brain can handle right now).

.. _Python-checkins: http://mail.python.org/mailman/listinfo/python-checkins
.. _PEP 246: http://www.python.org/peps/pep-0246.html
.. Guido's blog: http://www.artima.com/weblogs/index.jsp?blogger=guido

Contributing threads:
   - `getattr and __mro__ <>`__
   - `Son of PEP 246, redux <>`__
   - `PEP 246: lossless and stateless <>`__
   - `PEP 246: LiskovViolation as a name <>`__
   - `"Monkey Typing" pre-PEP, partial draft <>`__


------------------------------------------------------------------------------------
Optional type checking: how to inadvertently cause a flame war worse than 
decorators
------------------------------------------------------------------------------------
`Guido's blog`_ had comments on the idea of adding optional static type 
checking to Python.  While just comments in a blog, it caused a massive 
response from people, mostly negative from what I gathered.  After Guido 
discussed things some more it culminated in a blog entry found at 
http://www.artima.com/weblogs/viewpost.jsp?thread=87182 that lays out what his 
actual plans are.  I highly recommend reading it since it suggests adding 
optional run-time type checking for function arguments along with some other 
proposals.

All of this led to `PEP 246`_ getting updated.  For some more details on that 
see the `PEP movements`_ section of this summary.

And if there is a lesson to be learned from all of this, it's that when Alex 
Martelli and Phillip J. Eby start a technical discussion it's going to be long, 
in-depth, complex, and lead to my inbox being brimming in python-dev email.


------------------------------
Let's get the AST branch done!
------------------------------
Guido posted an email to the list stating he would like to to make progress 
towards integrating "things like type inferencing, integrating PyChecker, or 
optional static type checking" into Python.  In order to make that easier he 
put out a request that people work on the AST branch and finish it.

For those that don't know about Python's back-end, the compiler as it stands 
now takes the parse tree from the parser and emits bytecode directly from that. 
  This is far from optimal since the parse tree is more verbose than needed and 
it is not the easiest thing to work with.

The AST branch attempts to fix this by taking a more traditional approach to 
compiling.  This means the parse tree is used to generate an AST (abstract 
syntax tree; and even more technically could be considered a control flow graph 
in view of how it is implemented) which in turn is used to emit bytecode.  The 
AST itself is much easier to work with when compared to the parse tree; better 
to know you are working with an 'if' guard thanks to it being an 'if' node in 
the AST than checking if the parse tree statement you are working with starts 
with 'if' and ends with a ':'.

While all of this sounds great, the issue is the AST branch is not finished 
yet.  It is not entirely far off, but new features from 2.4 (decorators and 
generator expressions) need to be added along with more bug fixing and clean up.

This means the AST branch is going to get finished for 2.5 somehow.  But help 
is needed.  While the usual suspects who have previously contributed to the 
branch are hoping to finish it, more help is always appreciated.  If you care 
to get involved, check out the AST branch (tagged as 'ast-branch' in CVS; see 
the `python-dev FAQ`_ on how to do a tagged branch checkout), read 
Python/compile.txt and just dive in!  There will also be a sprint on the AST 
branch at PyCon.

.. _python-dev FAQ: http://www.python.org/dev/devfaq.html

Contributing threads:
   - `Please help complete the AST branch <>`__
   - `Will ASTbranch compile on windows yet? <>`__
   - `ast branch pragmatics <>`__
   - `Re: [Python-checkins] python/dist/src/Python pythonrun.c, 2.161.2.15, 
2.161.2.16 <>`__


--------------------------------
Ditching unbound methods in Py3k
--------------------------------
Guido suggested removing unbound methods from Python since their usefulness of 
checking their first argument and other slight differences from functions just 
didn't seem worth keeping around and complicating the language.  So the idea 
seems sound.

But then people with uses for the extra information kept in unbound methods 
(im_func and im_self) popped up.  To make the long thread short, enough people 
stepped up mentioning uses they had for the information for Guido to retract 
the suggestion in the name of backwards compatibility.

But unbound methods are now on the list of things to go in Python 3000.

Contributing threads:
   - `Let's get rid of unbound methods <>`__
   - `Getting rid of unbound methods: patch available <>`__
   - `PEP 246 - concrete assistance to developers of new	adapter classes <>`__


------------------------------------------
Getting exceptions to be new-style classes
------------------------------------------
A patch to allow exceptions to be new-style classes is currently at 
http://www.python.org/1104669 .  The plan is to get that patch in order, apply 
it, and as long as a ton of code does not break from exceptions moving from 
classic to new-style classes it will be made permanent in 2.5 .

This in no way touches on the major changes as touched upon in a `previous 
summary 
<http://www.python.org/dev/summary/2004-09-01_2004-09-15.html#cleaning-the-exception-house>`__ 
which will need a PEP to get the hierarchy cleaned up and discuss any possible 
changes to bar 'except' statements.

Contributing threads:
   - `Exceptions *must*? be old-style classes? <>`__

===============
Skipped Threads
===============
- Mac questions
- 2.3.5 schedule, and something I'd like to get in
-  csv module TODO list
- an idea for improving struct.unpack api
- Minor change to behaviour of csv module
- PATCH/RFC for AF_NETLINK support
- logging class submission
- Recent IBM Patent releases
- frame.f_locals is writable
- redux: fractional seconds in strptime
- Darwin's realloc(...) implementation never shrinks allocations


More information about the Python-Dev mailing list