Re: Why are there no ordered dictionaries?

2005-12-01 Thread Bengt Richter
On 1 Dec 2005 03:53:27 -0800, Fuzzyman [EMAIL PROTECTED] wrote: Hmmm... it would be interesting to see if these tests can be used with odict. I assume you are referring to the pytest tests I posted, though I would need some of the context you snipped to me more sure ;-) Anyway, with some

Re: Why are there no ordered dictionaries?

2005-12-01 Thread Bengt Richter
On 1 Dec 2005 01:48:56 -0800, Fuzzyman [EMAIL PROTECTED] wrote: Christoph Zwerschke wrote: Hello Christoph, I think re-ordering will be a very rare use case anyway and slicing even more. As a use case, I think of something like mixing different configuration files and default configuration

Re: URI http get

2005-12-01 Thread jepler
The urllib2 module is designed for tasks like this. The tutorial shows how to use urllib2.urlopen() to fetch the contents of a URL using the http protocol. Jeff pgpdV8higv7SR.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: CGI module does not parse data

2005-12-01 Thread Peter Hansen
amfr wrote: I just read somewhere that the CGIHTTPServer module does not work on mac (which I am currently using), is this true? It might help a lot if you could include a link to somewhere, so we'd know what does not work meant... often it means one particular feature is not perfect, as

Re: Making immutable instances

2005-12-01 Thread Ben Finney
Mike Meyer [EMAIL PROTECTED] wrote: Ben Finney [EMAIL PROTECTED] writes: Mike Meyer [EMAIL PROTECTED] wrote: Lots of people seem to want immutable instances. Nobody seems to have a use case for them. Perhaps you missed my release announcement of the 'enum' package that explains why Enum

Re: Making immutable instances

2005-12-01 Thread Mike Meyer
[EMAIL PROTECTED] writes: Mike Meyer wrote: That's not a use case, that's a debugging aid. The same logic applies to adding type declarations, private/public/etc. declerations, and similar BD language features. It's generally considered that it's not a good enough reason for adding those, so

Re: Making immutable instances

2005-12-01 Thread Mike Meyer
Ben Finney [EMAIL PROTECTED] writes: Since the values of an enumeration are directly reflected in the values and attributes, Enum instances are immutable to preserve this relationship This justifies making the attributes immutable. But that's old hat - I had that use case last

Re: Making immutable instances

2005-12-01 Thread bonono
Mike Meyer wrote: By design, this is a don't use feature so it would be very hard to find a use case ;-) But I can think of use cases for instances with no mutable attributes, which is another don't use case. If I can do that, those proposing that instances ought to be immutable should be

Re: CGI question

2005-12-01 Thread Istvan Albert
I'm still wondering though, if there's some part of the python standard modules that will convert those % escapes to ASCII or similar - and I believe that functionality is provided by the quote/unquote functions in the urllib module: http://www.python.org/doc/current/lib/module-urllib.html

Re: aligning a set of word substrings to sentence

2005-12-01 Thread Michael Spencer
Steven Bethard wrote: I've got a list of word substrings (the tokens) which I need to align to a string of text (the sentence). The sentence is basically the concatenation of the token list, with spaces sometimes inserted beetween tokens. I need to determine the start and end offsets of

Re: Ruby on Rails Job Site -- Is there a Python equivalent?

2005-12-01 Thread Adrian Holovaty
Ray wrote: I just found a job listing site for Ruby on Rails. http://jobs.rubynow.com/ I wonder if there's an equivalent one for Django? Here ya go: http://code.djangoproject.com/wiki/DevelopersForHire See the Django-powered jobs section. We could definitely advertise this page more, as

Re: Making immutable instances

2005-12-01 Thread Alex Martelli
Mike Meyer [EMAIL PROTECTED] wrote: ... This is a problem with OO in general, not with not having immutable instances. You get the same problem if, instead of attaching attributes to your instances, I subclass your class and add the attribute in the subclass (which I can do even if both my

Re: Is there no compression support for large sized strings in Python?

2005-12-01 Thread Alex Martelli
Claudio Grondi [EMAIL PROTECTED] wrote: ... In this context I am very curious how many of such 2 GByte strings is it possible to create within a single Python process? VM (Virtual Memory) may make the issue difficult to answer precisely. With a Python build for 64-bit addressing (and

Re: Eclipse best/good or bad IDE for Python?

2005-12-01 Thread elbertlev
Eclipse is very-very slow. 3G P4 looks like 8M 86. It might be good for Java, but not for Python. BUT THIS IS 1 OF 2 IDE'S WHICH ALLOWS DEBUGGING OF MULTITHREADED APPLICATIONS. I prefer Eric or PythonWin. -- http://mail.python.org/mailman/listinfo/python-list

Re: Eclipse best/good or bad IDE for Python?

2005-12-01 Thread elbertlev
Eclipse is very-very slow. 3G P4 looks like 8M 86. It might be good for Java, but not for Python. BUT THIS IS 1 OF 2 IDE'S WHICH ALLOWS DEBUGGING OF MULTITHREADED APPLICATIONS. I prefer Eric or PythonWin. -- http://mail.python.org/mailman/listinfo/python-list

get current function name

2005-12-01 Thread Joe Wong (Mango)
Hello, Is this possible for a function to obtain its own name ? eg. def func1(): print "my name is " + get_my_name() the result will show "my name is func1" Regards, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: Eclipse best/good or bad IDE for Python?

2005-12-01 Thread James
There is no answer for that question. All Python IDEs have their own strengths and weaknesses and different programmers expect different things from their IDEs. What's best for YOU depends on what features you need. PyDev, without question a good IDE. BEST is a subjective affair. I use Eclipse

Re: Making immutable instances

2005-12-01 Thread Mike Meyer
[EMAIL PROTECTED] writes: Mike Meyer wrote: By design, this is a don't use feature so it would be very hard to find a use case ;-) But I can think of use cases for instances with no mutable attributes, which is another don't use case. If I can do that, those proposing that instances ought

Re: python speed

2005-12-01 Thread casevh
DecInt's division algorithm is completely general also. But I would never claim that Python code is faster than assembler. I believe that careful implementation of a good algorithm is more important than the raw speed of the language or efficiency of the compiler. Python makes it easy to implement

Re: Death to tuples!

2005-12-01 Thread Bengt Richter
On 1 Dec 2005 09:24:30 GMT, Antoon Pardon [EMAIL PROTECTED] wrote: On 2005-11-30, Duncan Booth [EMAIL PROTECTED] wrote: Antoon Pardon wrote: The left one is equivalent to: __anon = [] def Foo(l): ... Foo(__anon) Foo(__anon) So, why shouldn't: res = [] for i in

Re: ANN: Dao Language v.0.9.6-beta is release!

2005-12-01 Thread Bengt Richter
On Wed, 30 Nov 2005 20:53:50 -0500, [EMAIL PROTECTED] wrote: Please trim replies... ; ) Not quite so far ;-) Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: Making immutable instances

2005-12-01 Thread Ben Finney
Mike Meyer [EMAIL PROTECTED] wrote: Ben Finney [EMAIL PROTECTED] writes: Since the values of an enumeration are directly reflected in the values and attributes, Enum instances are immutable to preserve this relationship This justifies making the attributes immutable. But

Re: Death to tuples!

2005-12-01 Thread bonono
Bengt Richter wrote: Because the empty list expression '[]' is evaluated when the expression containing it is executed. Again you are just stating the specific choice python has made. Not why they made this choice. Why are you interested in the answer to this question? ;-) Do you want

Re: Making immutable instances

2005-12-01 Thread Mike Meyer
Ben Finney [EMAIL PROTECTED] writes: Mike Meyer [EMAIL PROTECTED] wrote: Ben Finney [EMAIL PROTECTED] writes: Since the values of an enumeration are directly reflected in the values and attributes, Enum instances are immutable to preserve this relationship This justifies

get current function name

2005-12-01 Thread Ezequiel, Justin
See module inspect -- http://mail.python.org/mailman/listinfo/python-list

Re: get current function name

2005-12-01 Thread Micah Elliott
On Dec 02, Joe Wong (Mango) wrote: Is this possible for a function to obtain its own name ? eg. def func1(): print my name is + get_my_name() the result will show my name is func1 This very question was discussed recently:

Re: New Ordered Dictionery to Criticise

2005-12-01 Thread Bengt Richter
On 1 Dec 2005 03:38:37 -0800, Fuzzyman [EMAIL PROTECTED] wrote: Fuzzyman wrote: Sorry for this hurried message - I've done a new implementation of out ordered dict. This comes out of the discussion on this newsgroup (see blog entry for link to archive of discussion). See the latest blog

Re: Ruby on Rails Job Site -- Is there a Python equivalent?

2005-12-01 Thread Ray
Adrian Holovaty wrote: Here ya go: http://code.djangoproject.com/wiki/DevelopersForHire See the Django-powered jobs section. We could definitely advertise this page more, as it's a bit hidden at the moment on the Django wiki. There are three Django jobs on that page now, and I know of at

Re: UnicodeDecodeError

2005-12-01 Thread ash
Thanks Jarek, doubling worked. I thought it was a problem with encoding but didnt think of escaping it. thanks a lot. Thanks for Fredrik too for taking the trouble. Regards, Ashoka -- http://mail.python.org/mailman/listinfo/python-list

[ python-Bugs-1370322 ] Bytecode problems with test_colorsys

2005-12-01 Thread SourceForge.net
Bugs item #1370322, was opened at 2005-11-30 19:49 Message generated for change (Comment added) made by arigo You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1370322group_id=5470 Please note that this message will contain a full copy of the comment thread,

[ python-Bugs-1350060 ] built-in method .__cmp__

2005-12-01 Thread SourceForge.net
Bugs item #1350060, was opened at 2005-11-07 08:55 Message generated for change (Comment added) made by arigo You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1350060group_id=5470 Please note that this message will contain a full copy of the comment thread,

[ python-Bugs-1246405 ] Segmentation fault when importing expat from xml.parser

2005-12-01 Thread SourceForge.net
Bugs item #1246405, was opened at 2005-07-28 01:07 Message generated for change (Comment added) made by bernhard You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1246405group_id=5470 Please note that this message will contain a full copy of the comment

[ python-Feature Requests-1370948 ] Start and end parameters for list.count()

2005-12-01 Thread SourceForge.net
Feature Requests item #1370948, was opened at 2005-12-01 16:12 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=355470aid=1370948group_id=5470 Please note that this message will contain a

[ python-Bugs-1371247 ] locale.windows_locale

2005-12-01 Thread SourceForge.net
Bugs item #1371247, was opened at 2005-12-01 21:50 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1371247group_id=5470 Please note that this message will contain a full copy of

[ python-Bugs-1371247 ] locale.windows_locale

2005-12-01 Thread SourceForge.net
Bugs item #1371247, was opened at 2005-12-01 21:50 Message generated for change (Comment added) made by ghazel You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1371247group_id=5470 Please note that this message will contain a full copy of the comment

[ python-Bugs-1370197 ] memory leak - ast_error_finish

2005-12-01 Thread SourceForge.net
Bugs item #1370197, was opened at 2005-11-30 08:41 Message generated for change (Comment added) made by nnorwitz You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1370197group_id=5470 Please note that this message will contain a full copy of the comment

[ python-Bugs-1355842 ] Incorrect Decimal-float behavior for += and *=

2005-12-01 Thread SourceForge.net
Bugs item #1355842, was opened at 2005-11-13 11:17 Message generated for change (Comment added) made by connelly You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1355842group_id=5470 Please note that this message will contain a full copy of the comment

<    1   2   3