Re: [Python-Dev] Add a -z interpreter flag to execute a zip file

2007-07-23 Thread Crutcher Dunnavant
Crutcher Dunnavant On Jul 23, 2007, at 9:55 AM, Guido van Rossum [EMAIL PROTECTED] wrote: On 7/12/07, Daniel Stutzbach [EMAIL PROTECTED] wrote: On 7/11/07, Andy C [EMAIL PROTECTED] wrote: The good thing about this is that it's extremely simple -- basically 20 lines of C code to add a -z

Re: [Python-Dev] Builtin exit, good in interpreter, bad in code.

2006-04-24 Thread Crutcher Dunnavant
Unsubscribe: http://mail.python.org/mailman/options/python-dev/crutcher%40gmail.com -- Crutcher Dunnavant [EMAIL PROTECTED] littlelanguages.com monket.samedi-studios.com ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman

[Python-Dev] Should issubclass() be more like isinstance()?

2006-04-04 Thread Crutcher Dunnavant
() won't work on a list of classs, the way isinstance() does. Is there any support for patches which fix A and/or B? -- Crutcher Dunnavant [EMAIL PROTECTED] littlelanguages.com monket.samedi-studios.com ___ Python-Dev mailing list Python-Dev@python.org http

Re: [Python-Dev] Should issubclass() be more like isinstance()?

2006-04-04 Thread Crutcher Dunnavant
On 4/4/06, Greg Ewing [EMAIL PROTECTED] wrote: Crutcher Dunnavant wrote: A) issubclass() throws a TypeError if the object being checked is not a class, which seems very strange. If I ever pass a non-class to issubclass() it's almost certainly a bug in my code, and I'd want to know about

Re: [Python-Dev] Should issubclass() be more like isinstance()?

2006-04-04 Thread Crutcher Dunnavant
On 4/4/06, Guido van Rossum [EMAIL PROTECTED] wrote: On 4/4/06, Crutcher Dunnavant [EMAIL PROTECTED] wrote: On 4/4/06, Greg Ewing [EMAIL PROTECTED] wrote: Crutcher Dunnavant wrote: A) issubclass() throws a TypeError if the object being checked is not a class, which seems very

[Python-Dev] SF:1463370 add .format() method to str and unicode

2006-04-03 Thread Crutcher Dunnavant
From discussion on python-3000, it occured to me that this shouldn't break anything. This patch adds a .format() method to the string and unicode types. SF:1463370 -- Crutcher Dunnavant [EMAIL PROTECTED] littlelanguages.com monket.samedi-studios.com

Re: [Python-Dev] String formating in python 3000

2006-04-02 Thread Crutcher Dunnavant
Yep, moved this there. On 4/2/06, Aahz [EMAIL PROTECTED] wrote: On Sun, Apr 02, 2006, Crutcher Dunnavant wrote: But I have some questions about this for python 3000. Please use the python-3000 list for questions like this. -- Aahz ([EMAIL PROTECTED]) * http

[Python-Dev] String formating in python 3000

2006-04-02 Thread Crutcher Dunnavant
to __rmod__? * time: %s(time.ctime()) == time: %s % time.ctime() * %(a)s %(b)s(a=1, b=2) == %(a)s %(b)s % {'a'=1, 'b'=2} -- Crutcher Dunnavant [EMAIL PROTECTED] littlelanguages.com monket.samedi-studios.com ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] quit() on the prompt

2006-03-07 Thread Crutcher Dunnavant
://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/crutcher%40gmail.com -- Crutcher Dunnavant [EMAIL PROTECTED] littlelanguages.com monket.samedi-studios.com ___ Python-Dev mailing list Python-Dev

Re: [Python-Dev] defaultdict proposal round three

2006-02-20 Thread Crutcher Dunnavant
://mail.python.org/mailman/options/python-dev/crutcher%40gmail.com -- Crutcher Dunnavant [EMAIL PROTECTED] littlelanguages.com monket.samedi-studios.com ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev

Re: [Python-Dev] defaultdict proposal round three

2006-02-20 Thread Crutcher Dunnavant
, Crutcher Dunnavant [EMAIL PROTECTED] wrote: Sorry to chime in so late, but why are we setting a value when the key isn't defined? It seems there are many situations where you want: a) default values, and b) the ability to determine if a value was defined. There are many times that I want

Re: [Python-Dev] defaultdict proposal round three

2006-02-20 Thread Crutcher Dunnavant
in two ways: 1) dict.get doesn't work for object dicts or in exec/eval contexts, and 2) dict.get requires me to generate the default value even if I'm not going to use it, a process which may be expensive. On 2/20/06, Raymond Hettinger [EMAIL PROTECTED] wrote: [Crutcher Dunnavant

[Python-Dev] New Module: CommandLoop

2006-02-19 Thread Crutcher Dunnavant
: raise cmdloop.HaltLoop HelloGoodbye().runLoop() -- Crutcher Dunnavant [EMAIL PROTECTED] littlelanguages.com monket.samedi-studios.com ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http

Re: [Python-Dev] New Module: CommandLoop

2006-02-19 Thread Crutcher Dunnavant
oops, error in the example: s/commandLoop/CommandLoop/g On 2/19/06, Crutcher Dunnavant [EMAIL PROTECTED] wrote: This is something I've been working on for a bit, and I think it is more or less ready to bring up on this list. I'd like to add a module (though probably not for 2.5). Before you

Re: [Python-Dev] New Module: CommandLoop

2006-02-19 Thread Crutcher Dunnavant
Yes, I know. Hence this not being a patch. This is really meant to be a compelling alternative to cmd.Cmd, and as such I'm trying to get some discussion about it. On 2/19/06, Brett Cannon [EMAIL PROTECTED] wrote: On 2/19/06, Crutcher Dunnavant [EMAIL PROTECTED] wrote: This is something I've

Re: [Python-Dev] New Module: CommandLoop

2006-02-19 Thread Crutcher Dunnavant
Whoa, thanks. Incorporated the suggestions to the code. On 2/19/06, Raymond Hettinger [EMAIL PROTECTED] wrote: [Crutcher Dunnavant] Anyway, I'm looking for feedback, feature requests before starting the submission process. With respect to the API, the examples tend to be visually dominated

Re: [Python-Dev] New Module: CommandLoop

2006-02-19 Thread Crutcher Dunnavant
s/catch modules/catch exceptions/g On 2/19/06, Crutcher Dunnavant [EMAIL PROTECTED] wrote: Whoa, thanks. Incorporated the suggestions to the code. On 2/19/06, Raymond Hettinger [EMAIL PROTECTED] wrote: [Crutcher Dunnavant] Anyway, I'm looking for feedback, feature requests before starting

Re: [Python-Dev] New Module: CommandLoop

2006-02-19 Thread Crutcher Dunnavant
be of limited utility, versus throwing errors if the user specified something unsupported. Raymond -- Crutcher Dunnavant [EMAIL PROTECTED] littlelanguages.com monket.samedi-studios.com ___ Python-Dev mailing list Python-Dev@python.org http

Re: [Python-Dev] New Module: CommandLoop

2006-02-19 Thread Crutcher Dunnavant
-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/crutcher%40gmail.com -- Crutcher Dunnavant [EMAIL PROTECTED] littlelanguages.com monket.samedi-studios.com

Re: [Python-Dev] [Tutor] nice()

2006-02-14 Thread Crutcher Dunnavant
. There are just too many places where you are going to get name clashes, where something which is _obvious_ in one context will have a different ( and _obvious_ ) meaning in another. Lets just keep the namespaces clean, and not worry about inter-module conflicts. -- Crutcher Dunnavant [EMAIL PROTECTED

Re: [Python-Dev] [Tutor] nice()

2006-02-14 Thread Crutcher Dunnavant
, Michael On 2/14/06, Crutcher Dunnavant [EMAIL PROTECTED] wrote: On 2/12/06, Alan Gauld [EMAIL PROTECTED] wrote: However I do dislike the name nice() - there is already a nice() in the os module with a fairly well understood function. But I'm sure some Presumably it would be located

Re: [Python-Dev] The decorator(s) module

2006-02-11 Thread Crutcher Dunnavant
decorator is impossible... regards, Georg ___ 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/crutcher%40gmail.com -- Crutcher

[Python-Dev] Any interest in tail call optimization as a decorator?

2006-02-07 Thread Crutcher Dunnavant
, # but doesn't hit the recursion limit. @tail_call_optimized def fib(i, current = 0, next = 1): if i == 0: return current else: return fib(i - 1, next, current + next) print fib(1) # also prints a big number, # but doesn't hit the recursion limit. -- Crutcher Dunnavant [EMAIL

Re: [Python-Dev] Let's just *keep* lambda

2006-02-05 Thread Crutcher Dunnavant
/python-dev/crutcher%40gmail.com -- Crutcher Dunnavant [EMAIL PROTECTED] monket.samedi-studios.com ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options

Re: [Python-Dev] Let's just *keep* lambda

2006-02-05 Thread Crutcher Dunnavant
Unsubscribe: http://mail.python.org/mailman/options/python-dev/crutcher%40gmail.com -- Crutcher Dunnavant [EMAIL PROTECTED] monket.samedi-studios.com ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python

Re: [Python-Dev] [PATCH] Fix dictionary subclass semantics whenused as global dictionaries

2006-02-05 Thread Crutcher Dunnavant
I've significantly re-worked the patch to permit globals to be arbitrary mappings. The regression tests continue to all pass. http://sourceforge.net/tracker/index.php?func=detailaid=1402289group_id=5470atid=305470 On 1/24/06, Martin v. Löwis [EMAIL PROTECTED] wrote: Crutcher Dunnavant wrote

Re: [Python-Dev] [PATCH] Fix dictionary subclass semantics whenused as global dictionaries

2006-01-24 Thread Crutcher Dunnavant
: Crutcher Dunnavant wrote: I sorta disagree about it not being broken. Adding a feature which works for eval but not for exec seems pretty broken. You seem to have a different notion of to be broken, then. Python is broken, if and only if - the interpreter crashes, for any Python input

Re: [Python-Dev] [PATCH] Fix dictionary subclass semantics whenused as global dictionaries

2006-01-12 Thread Crutcher Dunnavant
(the given use cases, more detailed timings, and a close reading of the code). If accepted, it will be for Py2.5, as it is a new feature. There is nothing broken about the existing eval() version, it just doesn't apply as broadly as you would have liked. Raymond -- Crutcher Dunnavant

Re: [Python-Dev] [PATCH] Fix dictionary subclass semantics when used as global dictionaries

2006-01-11 Thread Crutcher Dunnavant
Is there any objection to this patch? Any support? On 1/10/06, Crutcher Dunnavant [EMAIL PROTECTED] wrote: 1402289 On 1/10/06, Aahz [EMAIL PROTECTED] wrote: On Tue, Jan 10, 2006, Crutcher Dunnavant wrote: There is an inconsistancy in the way that dictionary subclasses behave when

[Python-Dev] [PATCH] Fix dictionary subclass semantics when used as global dictionaries

2006-01-10 Thread Crutcher Dunnavant
. The attached patch (and unittest!) addresses this issue. I'm pretty sure we keep the fast path in this. -- Crutcher Dunnavant [EMAIL PROTECTED] monket.samedi-studios.com dictsubclassexec.patch Description: Binary data ___ Python-Dev mailing list Python

[Python-Dev] Hello

2006-01-10 Thread Crutcher Dunnavant
Sorry, sent a patch without an intro. My name is Crutcher Dunnavant I'm working on a doctorate in computer science (in modeling language practises). Before I got my master's degree, I used to work for Red Hat in North Carolina as an OS developer, and I now work in the San Fransisco Bay Area

Re: [Python-Dev] [PATCH] Fix dictionary subclass semantics when used as global dictionaries

2006-01-10 Thread Crutcher Dunnavant
1402289 On 1/10/06, Aahz [EMAIL PROTECTED] wrote: On Tue, Jan 10, 2006, Crutcher Dunnavant wrote: There is an inconsistancy in the way that dictionary subclasses behave when they are used as as namespaces in execs. Basically, while python 2.4 permits the usage of dictionary subclasses

Re: [Python-Dev] [PATCH] Fix dictionary subclass semantics when used as global dictionaries

2006-01-10 Thread Crutcher Dunnavant
ld.del_notify_func = None self.assert_(ld['b'] == 1) self.assert_('a' in ll) self.assert_('a' in gl) def test_main(): test_support.run_unittest( DictSubclassExecTest, ) if __name__ == __main__: test_main() On 1/10/06, Crutcher Dunnavant [EMAIL