Re: [Python-Dev] PySequence_Concat for dicts

2008-01-11 Thread Raymond Hettinger
> I'd like to take an "all or nothing" approach to this: either we > implement the same 4 operations as for sets (|, &, ^ and -) or we > implement none of them. . . . . > I'm not sure where I stand on this proposal -- I guess a +0, if > someone else does the work. (The abc.py module needs to be up

Re: [Python-Dev] Bug day preparations: tagging bugs?

2008-01-11 Thread A.M. Kuchling
On Fri, Jan 11, 2008 at 03:58:35PM -0800, Guido van Rossum wrote: > Let me know if more is needed, Andrew. Thanks! I've run searches for a few different components and marked a few bugs with the 'easy' keyword; I see that Tiran is doing this, too. > (I have no idea if anyone can add keywords or

Re: [Python-Dev] PySequence_Concat for dicts

2008-01-11 Thread Guido van Rossum
On Jan 11, 2008 5:21 PM, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > > I wasn't suggesting that the result of concatenation would > > be a chained table, rather that it would perform the > > equivalent of an update and return the new dict > >(the same way extend works for lists) > > When does

Re: [Python-Dev] PEP: per user site-packages directory

2008-01-11 Thread Alexandre Vassalotti
I can't comment on the implementation details, but +1 for the idea. I think this feature will be very useful in a shared hosting environment. -- Alexandre On Jan 11, 2008 6:27 PM, Christian Heimes <[EMAIL PROTECTED]> wrote: > PEP: XXX > Title: Per user site-packages directory > Version: $Revision

[Python-Dev] How to change path at compile time?

2008-01-11 Thread Jason Garber
Hello, Is there any reasonable way to change the default sys.path at compile time? (ie. add a directory). (I am aware of $PYTHONPATH for runtime) -- Best Regards, Jason Garber Senior Systems Engineer IonZoft, Inc. (814) 941-2390 [EMAIL PROTECTED]

Re: [Python-Dev] New Developer

2008-01-11 Thread Fernando Perez
Mark Dickinson wrote: > Hello all, > I've recently been granted commit privileges; so, following the usual > protocol, here's a quick introduction. I'm a mathematician by day; my > degree is in number theory, but five summers of Fortran 77 programming and > two semesters of teaching numerical an

Re: [Python-Dev] PySequence_Concat for dicts

2008-01-11 Thread Raymond Hettinger
> I wasn't suggesting that the result of concatenation would > be a chained table, rather that it would perform the > equivalent of an update and return the new dict >(the same way extend works for lists) When does it come-up that you want a third summed dict while keeping the two originals

Re: [Python-Dev] PySequence_Concat for dicts

2008-01-11 Thread Jared Flatow
On Jan 11, 2008, at 6:45 PM, Raymond Hettinger wrote: > IMO, the chainmap() recipe on ASPN is a much better solution since > it doesn't create a third dictionary with the all the attendant > allocation and copying effort. I wasn't suggesting that the result of concatenation would be a chaine

Re: [Python-Dev] PySequence_Concat for dicts

2008-01-11 Thread Raymond Hettinger
[Jared] > I think it would be convenient and pythonic if dict > objects implemented the PySequence_Concat method. IMO, the chainmap() recipe on ASPN is a much better solution since it doesn't create a third dictionary with the all the attendant allocation and copying effort. It isn't a common u

Re: [Python-Dev] Bug day preparations: tagging bugs?

2008-01-11 Thread Christian Heimes
Guido van Rossum wrote: > (I have no idea if anyone can add keywords or if I have magical > powers. On the left side bar there's a section "Administration" which > contains a link "Edit Keywords".) I'm unable to add new keywords although I've the developer role. I guess one needs to be a coordinat

Re: [Python-Dev] Bug day preparations: tagging bugs?

2008-01-11 Thread Guido van Rossum
I've added an "easy" keyword, with description "This is an easy task (e.g. suitable for GHOP or bug day beginners)". Let me know if more is needed, Andrew. (I have no idea if anyone can add keywords or if I have magical powers. On the left side bar there's a section "Administration" which contain

[Python-Dev] Coverity Scan, Python upgraded to rung 2

2008-01-11 Thread Jim Jewett
Neal Norwitz wrote: >> For codeobject.c, line 327 should not be reachable. ... Christian Heimes wrote: > Please suppress the warning. I removed the last > two lines and GCC complained ... Either way, it would be worth adding a comment to the source code so this doesn't come up again. -jJ ___

[Python-Dev] PEP: per user site-packages directory

2008-01-11 Thread Christian Heimes
MA Lemburg has suggested a per user site-packages directory in the "pkgutil, pkg_resource and Python 3.0 name space packages" thread. I've written a short PEP about it for Python 2.6 and 3.0. PEP: XXX Title: Per user site-packages directory Version: $Revision$ Last-Modified: $Date$ Author: Christi

[Python-Dev] PySequence_Concat for dicts

2008-01-11 Thread Jared Flatow
Hi all, I am fairly new to the Python community so please forgive me (and correct me) if I am going about this wrong. I think it would be convenient and pythonic if dict objects implemented the PySequence_Concat method. I see there was once a short-lived discussion about this here: http://

Re: [Python-Dev] PEP: Post import hooks

2008-01-11 Thread Christian Heimes
Phillip J. Eby wrote: > *sigh*. We seem to be getting further and further off course, > here. The more different you make the semantics of the system, the > harder it will be to verify that it's doing the right thing without > having real field experience with the new approach. *sigh*, too. :

Re: [Python-Dev] Bug day preparations: tagging bugs?

2008-01-11 Thread A.M. Kuchling
On Fri, Jan 11, 2008 at 09:45:14PM +0100, Christian Heimes wrote: > Please add two keywords, one for bug day and one for easy tasks. May > "beginner task", "easy" or "novice level" makes a good keyword. I think marking easy tasks is all we need. That would certainly be useful during ongoing non-b

Re: [Python-Dev] Bug day preparations: tagging bugs?

2008-01-11 Thread Christian Heimes
Guido van Rossum wrote: > Yes, it does. Unfortunately, I've been using "bug day" in some > comments and that doesn't seem to work well in the search. > > I think a keyword is easier, I can add it if you want me to. > Please add two keywords, one for bug day and one for easy tasks. May "beginner

Re: [Python-Dev] Bug day preparations: tagging bugs?

2008-01-11 Thread Guido van Rossum
On Jan 11, 2008 12:13 PM, A.M. Kuchling <[EMAIL PROTECTED]> wrote: > No one pushed back on the 19th as a bug day, so I'm going to go ahead > and send out announcements this evening. > > We should mark issues in the tracker that are good candidates for new > developers. How do we want to do this?

[Python-Dev] Bug day preparations: tagging bugs?

2008-01-11 Thread A.M. Kuchling
No one pushed back on the 19th as a bug day, so I'm going to go ahead and send out announcements this evening. We should mark issues in the tracker that are good candidates for new developers. How do we want to do this? We could add a new keyword ('beginner', 'bugday', ???) or add a prefix to

Re: [Python-Dev] Backporting PEP 3101 to 2.6

2008-01-11 Thread Eric Smith
Steve Holden wrote: > Nick Coghlan wrote: >> To elaborate on this a bit (and handwaving a lot of important details >> out of the way) do you mean something like the following for the builtin >> format?: >> >> def format(obj, fmt_spec=None): >> if fmt_spec is None: fmt_spec='' >> result

Re: [Python-Dev] Backporting PEP 3101 to 2.6

2008-01-11 Thread Eric Smith
Nick Coghlan wrote: > Guido van Rossum wrote: >> For data types whose output uses only ASCII, would it be acceptable if >> they always returned an 8-bit string and left it up to the caller to >> convert it to Unicode? This would apply to all numeric types. (The >> date/time types have a strftime()

Re: [Python-Dev] Backporting PEP 3101 to 2.6

2008-01-11 Thread Steve Holden
Nick Coghlan wrote: > Guido van Rossum wrote: >> For data types whose output uses only ASCII, would it be acceptable if >> they always returned an 8-bit string and left it up to the caller to >> convert it to Unicode? This would apply to all numeric types. (The >> date/time types have a strftime()

Re: [Python-Dev] Passing contextual information when logging

2008-01-11 Thread Nick Coghlan
Vinay Sajip wrote: > When I check it in I will elaborate on the class docstring to explain the > usage > in a bit more detail, as well as of course detailing it in the docs in a > separate section entitled "Passing contextual information to the log" (or > similar). Thanks, I understand what you m

Re: [Python-Dev] Passing contextual information when logging

2008-01-11 Thread Vinay Sajip
Nick Coghlan gmail.com> writes: > It looks pretty good (and useful) to me, but I have a couple of questions. > > When you talk about stacking in the constructor docstring, do you mean > something like having LoggerAdapterA delegating to LoggerAdapterB which > in turn delegates to the real logg

Re: [Python-Dev] Passing contextual information when logging

2008-01-11 Thread Nick Coghlan
Vinay Sajip at Red Dove wrote: > One solution is to create a generic wrapper around loggers to which a logger > name and contextual information can be passed. The wrapper would delegate > logging calls to the logger with the specified name, but would manipulate > the arguments passed to the logging

Re: [Python-Dev] Backporting PEP 3101 to 2.6

2008-01-11 Thread Nick Coghlan
Guido van Rossum wrote: > For data types whose output uses only ASCII, would it be acceptable if > they always returned an 8-bit string and left it up to the caller to > convert it to Unicode? This would apply to all numeric types. (The > date/time types have a strftime() style API which means the

[Python-Dev] Passing contextual information when logging

2008-01-11 Thread Vinay Sajip at Red Dove
I recently posted the following to c.l.py, and didn't get much feedback. I'm planning to add a new class to the logging package, and before I do so I'd like to get feedback from python-dev. I know many of the devs may not be monitoring c.l.py, so I'm reposting here for your feedback. Some users of