Re: [Python-Dev] Replacement for print in Python 3.0

2005-09-08 Thread Tommy Burnette
Michael Chermside writes:
| Guido writes:
|  Is it worth doing this and completely dropping the %-based formats in
|  Py3k? (Just asking -- it might be if we can get people to get over the
|  shock of $ becoming first class ;-).
| 
| In my opinion, YES -- it's worth seriously considering it. A single,
| well-designed solution for string interpolation (with syntactic support
| if needed to make it very easy to use) is FAR better than having one
| good solution and another legacy solution. Just the awkwardness of the
| trailing s in %(foo)s is enough to motivate a search for something
| better.


hey folks,

I managed to lose a few days worth of python-dev mail so I'm late to
this discussion, but I thought I'd toss in a few (possibly outlying)
data points form the visual effects/3d animation world.

here at ILM we use python as the expression langauge in a number of 3d
applications, and we usually end up adding a front-end parser so users
can reference variable values inline via $ sytanx.  they're still
essentially writing python code, but with the extra added suger of $
references.

I have first-hand information that the engineers at Pixar chose tcl
over python a few years back as the expression language in their
commercial shader editor slim for exactly this reason as well (i.e
tcl already had $ refs, and they didn't want to present their own
python-but-not language like we do here).

so if replacing '' % () formatting with $ refs is an option in py3k,
allow me to offer a +1000 vote for that :)

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] LinkedHashSet/LinkedHashMap equivalents

2005-03-09 Thread Tommy Burnette

I'd say I'm +0.  fwiw- I've been using a locally-rolled OrderedDict
implementation for the last 5-6 years in which insertion order is the
only order respected.  I use it all over the place (in a code base of
~60k lines of python code).

so there's another use case for you.  bust as you say, easy to do
yourself... 

=?ISO-8859-1?Q?Martin_v._L=F6wis?= writes:
| Thomas Heller wrote:
|  I cannot understand why people are against adding it to stdlib (after
|  the name, the implementation, and the exact place have been decided).
|  It's certainly a useful data type, isn't it?
| 
| It depends on the precise semantics. You often want a dictionary where
| the keys come out in some order - but that is rarely the order in which
| they were added to the dictionary. Most frequently, you want the keys
| sorted, according to some criteria. If not that, I would assume that you
| typically have the order of keys determined before even filling the
| dictionary, in which case you can do
| 
| for k in keys_in_preferred_order:
|  v = hashtable[k]
|  process(k,v)
| 
| I remember having needed that once in the past 15 years (in Smalltalk
| at the time), so I wrote an OrderedDictionary for Smalltalk/V (which
| didn't have it). It took me an hour or so.
| 
| I don't recall what precisely it was that I needed it for, and I cannot
| think of any use case for the data type right now.
| 
| So I'm -0 on adding the data type: I have a vague feeling it is needed,
| but rarely, and I don't know precisely what for.
| 
| Regards,
| Martin
| ___
| Python-Dev mailing list
| Python-Dev@python.org
| http://mail.python.org/mailman/listinfo/python-dev
| Unsubscribe: http://mail.python.org/mailman/options/python-dev/tommy%40ilm.com

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com