Hello,
I am quite new to development in python, and as a first contribution to the
community, I have provided a patch to the issue 8033 (quite trivial). I then
ran the test suite an everything was ok. However, the status has not
changed, and nobody has answered so far (patch provided one month ago
On Wed, Jan 5, 2011 at 04:13, Nick Coghlan wrote:
> On Wed, Jan 5, 2011 at 5:55 AM, brett.cannon
> wrote:
> > brett.cannon pushed 72a286c3452d to devguide:
> >
> > http://hg.python.org/devguide/rev/72a286c3452d
> > changeset: 13:72a286c3452d
> > user:Brett Cannon
> > date:Tue
On Wed, Jan 5, 2011 at 5:55 AM, brett.cannon wrote:
> brett.cannon pushed 72a286c3452d to devguide:
>
> http://hg.python.org/devguide/rev/72a286c3452d
> changeset: 13:72a286c3452d
> user: Brett Cannon
> date: Tue Jan 04 11:48:38 2011 -0800
> summary:
> Strip out all generic svn i
On Jan 4, 2011, at 4:36 PM, Brett Cannon wrote:
> For those of you who don't know, the PSF has given me a two month
> grant to work on the core. It's mostly focused on the long overdue
> overhaul of the dev docs (now being called the devguide) and writing a
> HOWTO on porting Python 2 code to Pyt
For those of you who don't know, the PSF has given me a two month
grant to work on the core. It's mostly focused on the long overdue
overhaul of the dev docs (now being called the devguide) and writing a
HOWTO on porting Python 2 code to Python 3. If I have time left over
it will be spent on the te
Steven> I've been known to monkey-patch builtins in the interactive
Steven> interpreter and in test code.
Me too. I use a slightly beefed up dir() funcion which identifies modules
within a package which haven't been imported yet. Handy for quick-n-dirty
introspection.
>>> import em
On Tue, Jan 4, 2011 at 3:36 PM, Michael Foord wrote:
> The only examples I could find from a quick search (using the patch
> decorator from my mock module which is reasonably well used) patch
> __builtins__.open and raw_input.
>
> https://www.google.com/codesearch?hl=en&lr=&q=%22patch%28%27__built
On 04/01/2011 23:29, Guido van Rossum wrote:
On Tue, Jan 4, 2011 at 3:13 PM, Steven D'Aprano wrote:
Guido van Rossum wrote:
But why couldn't you edit the source code?
Because there was no source code -- I was experimenting in the interactive
interpreter. I could have just re-created the funct
On 04/01/2011 23:29, Guido van Rossum wrote:
On Tue, Jan 4, 2011 at 3:13 PM, Steven D'Aprano wrote:
Guido van Rossum wrote:
But why couldn't you edit the source code?
Because there was no source code -- I was experimenting in the interactive
interpreter. I could have just re-created the funct
On Tue, Jan 4, 2011 at 2:13 PM, Lukas Lueg wrote:
> I very much like the fact that python has *very* little black magic
> revealed to the user. Strong -1 on optimizing picked builtins in a
> picked way.
That's easy for you to say.
--
--Guido van Rossum (python.org/~guido)
__
On Tue, Jan 4, 2011 at 3:13 PM, Steven D'Aprano wrote:
> Guido van Rossum wrote:
>> But why couldn't you edit the source code?
>
> Because there was no source code -- I was experimenting in the interactive
> interpreter. I could have just re-created the function by using the readline
> history, bu
I very much like the fact that python has *very* little black magic
revealed to the user. Strong -1 on optimizing picked builtins in a
picked way.
2011/1/4 Steven D'Aprano :
> Guido van Rossum wrote:
>>
>> On Tue, Jan 4, 2011 at 2:49 AM, Michael Foord
>> wrote:
>>>
>>> I think someone else pointe
Guido van Rossum wrote:
On Tue, Jan 4, 2011 at 1:50 PM, Steven D'Aprano wrote:
I've been known to monkey-patch builtins in the interactive interpreter and
in test code. One example that comes to mind is that I had some
over-complicated recursive while loop (!), and I wanted to work out the Big
On Tue, Jan 4, 2011 at 2:15 PM, Daniel Stutzbach wrote:
> On Tue, Jan 4, 2011 at 9:33 AM, Lukas Lueg
> wrote:
>>
>> The keys are immutable anyway so the instances of PyDict could manage
>> a opaque value (in fact, a counter) that changes every time a new
>> value is written to any key. Once we ge
On Tue, Jan 4, 2011 at 9:33 AM, Lukas Lueg wrote:
> The keys are immutable anyway so the instances of PyDict could manage
> a opaque value (in fact, a counter) that changes every time a new
> value is written to any key. Once we get a reference out of the dict,
> we can can do very fast lookups by
On Tue, Jan 4, 2011 at 1:50 PM, Steven D'Aprano wrote:
> I've been known to monkey-patch builtins in the interactive interpreter and
> in test code. One example that comes to mind is that I had some
> over-complicated recursive while loop (!), and I wanted to work out the Big
> Oh behaviour so I k
Guido van Rossum wrote:
On Tue, Jan 4, 2011 at 2:49 AM, Michael Foord wrote:
I think someone else pointed this out, but replacing builtins externally to
a module is actually common for testing. In particular replacing the open
function, but also other builtins, is often done temporarily to repl
On Tue, Jan 4, 2011 at 8:22 AM, Tres Seaver wrote:
> Note that Guido just recently wrote on that list that he considers that
> PEP to be de facto accepted.
That was conditional on there not being any objections in the next 24
hours. There have been plenty, so I'm retracting that.
--
--Guido van
Barry Warsaw wrote:
> On Jan 04, 2011, at 10:21 AM, Alex Gaynor wrote:
>
>>Ugh, I can't be the only one who finds these special cases to be a little
>>nasty?
>>
>>Special cases aren't special enough to break the rules.
>
> Yeah, I agree. Still it would be interesting to see what kind of
> perform
Doesnt this all boil down to being able to monitor PyDict for changes
to it's key-space?
The keys are immutable anyway so the instances of PyDict could manage
a opaque value (in fact, a counter) that changes every time a new
value is written to any key. Once we get a reference out of the dict,
we
On 04/01/2011 16:54, Barry Warsaw wrote:
On Jan 04, 2011, at 10:21 AM, Alex Gaynor wrote:
Ugh, I can't be the only one who finds these special cases to be a little
nasty?
Special cases aren't special enough to break the rules.
Yeah, I agree. Still it would be interesting to see what kind of
On Jan 04, 2011, at 10:21 AM, Alex Gaynor wrote:
>Ugh, I can't be the only one who finds these special cases to be a little
>nasty?
>
>Special cases aren't special enough to break the rules.
Yeah, I agree. Still it would be interesting to see what kind of performance
improvement this would resul
On Tue, Jan 4, 2011 at 8:21 AM, Alex Gaynor wrote:
> Ugh, I can't be the only one who finds these special cases to be a little
> nasty?
> Special cases aren't special enough to break the rules.
> Alex
+1, I don't think nailing down a few builtins is that helpful for
optimizing Python. Anyone att
At 03:44 AM 1/4/2011 +0100, Victor Stinner wrote:
Hi,
In the PEP , I read:
--
import os, sys
enc, esc = sys.getfilesystemencoding(), 'surrogateescape'
def wsgi_string(u):
# Convert an environment variable to a WSGI "bytes-as-unicode"
string
return u.encode(enc, esc).dec
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 01/03/2011 09:44 PM, Victor Stinner wrote:
> Hi,
>
> In the PEP , I read:
> --
> import os, sys
>
> enc, esc = sys.getfilesystemencoding(), 'surrogateescape'
>
> def wsgi_string(u):
> # Convert an environment variable to a WSG
On Tue, Jan 4, 2011 at 10:20 AM, Nick Coghlan wrote:
> On Wed, Jan 5, 2011 at 1:58 AM, Guido van Rossum wrote:
> > On Tue, Jan 4, 2011 at 2:49 AM, Michael Foord
> wrote:
> >> I think someone else pointed this out, but replacing builtins externally
> to
> >> a module is actually common for testi
On Wed, Jan 5, 2011 at 1:58 AM, Guido van Rossum wrote:
> On Tue, Jan 4, 2011 at 2:49 AM, Michael Foord
> wrote:
>> I think someone else pointed this out, but replacing builtins externally to
>> a module is actually common for testing. In particular replacing the open
>> function, but also other
On Mon, Jan 3, 2011 at 7:47 PM, Guido van Rossum wrote:
> Given the rule garbage in -> garbage out, I'd do the most useful
> thing, which would be to produce a longer output string (and update
> the docs).
I did not know that GIGO was a design rule, but after thinking about
it some more, I agree.
On Tue, Jan 4, 2011 at 2:49 AM, Michael Foord wrote:
> I think someone else pointed this out, but replacing builtins externally to
> a module is actually common for testing. In particular replacing the open
> function, but also other builtins, is often done temporarily to replace it
> with a mock.
On Tue, Jan 4, 2011 at 8:49 PM, Michael Foord wrote:
> I think someone else pointed this out, but replacing builtins externally to
> a module is actually common for testing. In particular replacing the open
> function, but also other builtins, is often done temporarily to replace it
> with a mock.
On Dec 30, 2010, at 02:50 AM, R. David Murray wrote:
>You are welcome; thanks for the feedback. (I sometimes feel
>like I'm working in a bit of a vacuum, though Barry does chime in
>occasionally...but I do realize that people are busy; that's
>why I inherited this job in the first place, after al
On Tue, 04 Jan 2011 14:33:37 +0100
Victor Stinner wrote:
> Le mardi 04 janvier 2011 à 13:20 +0100, Antoine Pitrou a écrit :
> > On Tue, 04 Jan 2011 03:44:53 +0100
> > Victor Stinner wrote:
> > > def wsgi_string(u):
> > > # Convert an environment variable to a WSGI "bytes-as-unicode"
> > > str
Le mardi 04 janvier 2011 à 13:20 +0100, Antoine Pitrou a écrit :
> On Tue, 04 Jan 2011 03:44:53 +0100
> Victor Stinner wrote:
> > def wsgi_string(u):
> > # Convert an environment variable to a WSGI "bytes-as-unicode"
> > string
> > return u.encode(enc, esc).decode('iso-8859-1')
> >
> > de
On Tue, 04 Jan 2011 03:44:53 +0100
Victor Stinner wrote:
> def wsgi_string(u):
> # Convert an environment variable to a WSGI "bytes-as-unicode"
> string
> return u.encode(enc, esc).decode('iso-8859-1')
>
> def run_with_cgi(application):
> environ = {k: wsgi_string(v) for k,v in os.env
On 04/01/2011 01:02, Guido van Rossum wrote:
On Mon, Jan 3, 2011 at 9:52 AM, David Malcolm wrote:
On Sun, 2011-01-02 at 19:18 -0800, Guido van Rossum wrote:
On Sun, Jan 2, 2011 at 5:50 PM, Alex Gaynor wrote:
No, it's singularly impossible to prove that any global load will be any given
value
35 matches
Mail list logo