A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2007-March/071870.html below:

[Python-Dev] Python-3000 upgrade path

[Python-Dev] Python-3000 upgrade path [Python-Dev] Python-3000 upgrade pathAndrew McNamara andrewm at object-craft.com.au
Mon Mar 12 02:05:47 CET 2007
>I wrote two versions of the dict views refactoring. One that turns
>d.keys() into list(d.keys()) and d.iterkeys() into iter(d.keys()).
>This one is pretty robust except if you have classes that emulate
>2.x-style dicts. But it generates ugly code. So I have a
>"light-weight" version that leaves d.keys() alone, while turning
>d.iterkeys() into d.keys(). This generates prettier code but more
>buggy. I probably should have used the heavy-duty one instead.

The ugliness is a virtue in this case as it stands out enough to motivate
developers to review each case. The pretty/efficient version is tantamount
to guessing, and effectively discards information in the transformation
("here be dragons").

-- 
Andrew McNamara, Senior Developer, Object Craft
http://www.object-craft.com.au/
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4