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

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

2006-02-14 Thread Crutcher Dunnavant
d driving, that doesn't mean cars should be designed with that as a motivating assumption. 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 c

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

2006-02-14 Thread Crutcher Dunnavant
mespace. > Regards, > 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 > > &g

[Python-Dev] New Module: CommandLoop

2006-02-19 Thread Crutcher Dunnavant
27;quit') def quitCmd(self, flags, args): ''' Quit the environment. ''' raise cmdloop.HaltLoop def _onLoopExit(self): if len(self.target_list): self.pushCommands(('quit',))

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 > (th

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: &

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,

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'

Re: [Python-Dev] New Module: CommandLoop

2006-02-19 Thread Crutcher Dunnavant
addspec(**kwds): > def decorator(func): > func.__dict__.update(kwds) > return func > return decorator > > With an open definition like that, users can specify new attributes with less > effort. Well, yes it could. But as

Re: [Python-Dev] New Module: CommandLoop

2006-02-19 Thread Crutcher Dunnavant
d example ;-). > > tjr > > > > ___ > 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 Dunnavant <[EM

Re: [Python-Dev] defaultdict proposal round three

2006-02-20 Thread Crutcher Dunnavant
site. > > Let the third round of the games begin! > > -- > --Guido van Rossum (home page: http://www.python.org/~guido/) > ___ > Python-Dev mailing list > Python-Dev@python.org > http://mail.python.org/mailman/listinfo/python-dev > Uns

Re: [Python-Dev] defaultdict proposal round three

2006-02-20 Thread Crutcher Dunnavant
20/06, 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

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: >

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

2006-03-07 Thread Crutcher Dunnavant
> 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 Dunnavant <[EMAIL PROTECTED]> littlelanguag

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 PROTE

[Python-Dev] String formating in python 3000

2006-04-02 Thread Crutcher Dunnavant
in addition 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] 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.same

[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@pyth

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 > certa

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 Typ

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

2006-04-23 Thread Crutcher Dunnavant
t;, line 1, in ? > File "", line 5, in __call__ >SyntaxError: You want to use sys.exit > > Jerub on #python thinks that maybe it needs to subclass the string object > instead, but in general it seems like it might be an improvement. Why don't we just not defin

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

2006-04-24 Thread Crutcher Dunnavant
n-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 ___

[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 m

[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

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

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

2006-01-10 Thread Crutcher Dunnavant
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 PROTECTED]> wrote: > 1402289 > &g

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 incons

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

2006-01-12 Thread Crutcher Dunnavant
n't apply > as broadly as you would have liked. > > > > Raymond > > -- 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/python-dev/archive%40mail-archive.com

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

2006-01-24 Thread Crutcher Dunnavant
PROTECTED]> wrote: > 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 i

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

2006-02-05 Thread Crutcher Dunnavant
thon-dev > 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/

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

2006-02-05 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]> monket.samedi-studios.com _

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=detail&aid=1402289&group_id=5470&atid=305470 On 1/24/06, "Martin v. Löwis" <[EMAIL PROTECTED

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

2006-02-07 Thread Crutcher Dunnavant
ts a big, big number, # 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.

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

2006-02-11 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 mai