Sean Reifschneider wrote:
> Thoughts?
As Martin pointed out, this was fixed for 2.5a1:
C:\>type demo.bat
@c:\python%1\python -c "exit()"
@echo %ERRORLEVEL%
C:\>demo 24
Traceback (most recent call last):
File "", line 1, in ?
TypeError: 'str' object is not callable
1
C:\>demo 25
0
Cheers,
Ni
Nick Coghlan wrote:
> Do we want to add a "released" context manager to the threading module for
> 2.5?
I don't think that should be added. I would consider it a dangerous
programming style: if the lock merely doesn't "need" to be held (i.e.
if it isn't necessary, but won't hurt), one should jus
Sean Reifschneider wrote:
> Thoughts?
In Python 2.5, exit(0) exits.
Regards,
Martin
___
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/arch
Tim:
> [Martin]
> > on XP SP2: test_mailbox fails to
> > me, with permission denied in some (random) test. I believe this
> > is due to Tortoise SVN: test_mailbox creates a few directories,
> > then Tortoise detects them (thanks to file change notifications)
> > and tries to walk them, to find out
Do we want to add a "released" context manager to the threading module for
2.5? It was mentioned using the name "unlocked" in PEP 343, but never spelt out:
class released(object):
def __init__(self, lock):
self.lock = lock
def __enter__(self):
self.lock.release()
Just van Rossum wrote:
> Baptiste Carvello wrote:
>
>> Terry Reedy a écrit :
>>> So I propose that the context maker be called just that: 'context
>>> maker'. That should pretty clearly not be the context that manages
>>> the block execution.
>>>
>> +1 for context maker. In fact, after reading the
Paul Moore wrote:
>> Aside from the What's New document, this has now been done. My modifications
>> consisted of terminology changes in the contextlib docs and the language
>> reference to match the 2.5a1 implementation, a Context Types addition to the
>> library reference similar to that for Iter
On 4/23/06, Sean Reifschneider <[EMAIL PROTECTED]> wrote:
> A friend of mine is learning Python, and had a problem with the exit
> builtin. I like that in the interpreter it gives useful information, but
> he was writing a program in a file and tried "exit(0)", and was presented
> with the non-obv
A friend of mine is learning Python, and had a problem with the exit
builtin. I like that in the interpreter it gives useful information, but
he was writing a program in a file and tried "exit(0)", and was presented
with the non-obvious error:
TypeError: 'str' object is not callable
What abou
I just read the manpage for Tk_Init(3) (fc4 package tk-8.4.9-3) and it
does not say that Tk_Init() may only be called once. While this doesn't
mean Python shouldn't work around it, I think the behavior should be
considered a bug in Tk, not _tkinter.
However, on this system, I couldn't recreate th
> Aside from the What's New document, this has now been done. My modifications
> consisted of terminology changes in the contextlib docs and the language
> reference to match the 2.5a1 implementation, a Context Types addition to the
> library reference similar to that for Iterator Types, and a very
Kirat Singh wrote:
> The reason I looked into this to begin with was that my code used up a
> bunch of memory which was traceable to lots of little objects with
> instance dicts, so it seemed that if instancedicts took less memory I
> wouldn't have to go and add __slots__ to a bunch of my classes,
For a while now, I've noticed test_tcl locking up when trying to refleaktest it. I was able to reproduce it quite simply:import Tkinterimport osif "DISPLAY" in os.environ: del os.environ
["DISPLAY"]tcl = Tkinter.Tcl()try: tcl.loadtk()except Exception, e: print etcl.loadtk()Or, more directl
Interesting, thanks for the responses. And yeah I meant 1/3, I always mix up negatives.Agree that as you point out the biggest slowdown will be on classes that define their own __hash__, however since classes use instancedicts and this would reduce the dict size from 96 -> 64 bytes, we could blow 4
Tim> Does the Python source even compile as C++ now? People have been
Tim> working toward that, but my last impression was that it's not there
Tim> yet.
Yes, not there yet. I can build the base interpreter, but there are lots of
module build problems. I got distracted, but will try
[Kirat Singh]
> Hi, this is my first python dev post, so please forgive me if this topic has
> already been discussed.
It's hard to find one that hasn't -- but it's even harder to find the
old discussions ;-)
> It seemed to me that removing me_hash from a dict entry would save 2/3 of
> the space
I had the possibly stupid idea today of running the stdlib through pylint.
Has anybody written a pylintrc file that attempts to reflect the
recommendations of PEP 8 the extent possible?
Thx,
Skip
___
Python-Dev mailing list
Python-Dev@python.org
http://
Tim Peters wrote:
> [Andrew MacIntyre]
Hmm... I don't appear to have explained what I meant very well :-|
{...}
> This really needs an executable example. Here's my best guess about
> what you mean, but I don't see any of what you're describing on WinXP
> Pro SP2:
And a pretty good guess it w
[Martin]
> I see a similar phenomenon (sp?)
Yup! The plural is phenomena.
> on XP SP2: test_mailbox fails to
> me, with permission denied in some (random) test. I believe this
> is due to Tortoise SVN: test_mailbox creates a few directories,
> then Tortoise detects them (thanks to file change no
"Just van Rossum" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>> +1 for context maker.
>Or maybe "context factory"?
Yes, I thought of that too. Latin 'facere' == 'to make'. I might even put
a sentence in the doc explaining that a context maker is a context factory,
in the CS
"Baptiste Carvello" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>+1 for context maker.
[me, Terry]
>> I would call the decorator @contextmaker since that is what it turns the
>> >> decorated function into.
>I'm confused here. Do we agree that the object with __enter__ and
> >
Nick Coghlan wrote:
> For those not following along at home, I've now updated PEP 343 to clarify my
> originally intended meanings for various terms, and to record the fact that
> we
> don't currently have a consensus on python-dev that those are the right
> definitions.
>
> As written up in t
Tim Peters wrote:
>> I've never reported this as a Python bug
>
> If you do, I'll probably add a comment like the above ;-)
>
>> because I've considered the antivirus SW likely to be the culprit.
>
> Could be. FWIW, Norton AV was running during the above.
I see a similar phenomenon (sp?) on XP
Anthony Baxter wrote:
> On Saturday 22 April 2006 15:27, Neal Norwitz wrote:
>> In case it wasn't clear, the /Wp64 flag is available in icc
>> (Intel's C compiler).
>
> Is it worth turning this on for the icc ubuntu buildbot? Anyone got
> ideas on the best way to do this? Should I just set CFLAGS
On Saturday 22 April 2006 15:27, Neal Norwitz wrote:
> In case it wasn't clear, the /Wp64 flag is available in icc
> (Intel's C compiler).
Is it worth turning this on for the icc ubuntu buildbot? Anyone got
ideas on the best way to do this? Should I just set CFLAGS="-Wp64"
before running the bui
Paul Moore wrote:
> On 4/23/06, Nick Coghlan <[EMAIL PROTECTED]> wrote:
>> For those not following along at home, I've now updated PEP 343 to clarify my
>> originally intended meanings for various terms, and to record the fact that
>> we
>> don't currently have a consensus on python-dev that those
On 4/23/06, Nick Coghlan <[EMAIL PROTECTED]> wrote:
> - contextlib.contextmanager()
> - is actually used to define contexts according to the current docs
> - but returns a GeneratorContextManager object
You may just be trying to avoid overcomplicating things by adding too
much detail
On 4/23/06, Phillip J. Eby <[EMAIL PROTECTED]> wrote:
> At 01:19 PM 4/23/2006 +1000, Anthony Baxter wrote:
> >On Sunday 23 April 2006 11:43, Nick Coghlan wrote:
> > > Maybe we need something that's the equivalent of alien (rpm -> dpkg
> > > converter), so that given an egg, one can easily get a nat
Baptiste Carvello wrote:
> Terry Reedy a écrit :
> > So I propose that the context maker be called just that: 'context
> > maker'. That should pretty clearly not be the context that manages
> > the block execution.
> >
> +1 for context maker. In fact, after reading the begining of the
> thread, I
Terry Reedy wrote:
> If you checked it in (after tests pass on your ?mac?, and while being ready
> to revert), wouldn't the next buildbot cycle do the testing you need?
> Isn't testing on 'other' platforms what buildbot is for?
Only up to a point... In this case, I was after code review as muc
Terry Reedy a écrit :
> So I propose that the context maker be called just that: 'context maker'.
> That should pretty clearly not be the context that manages the block
> execution.
>
+1 for context maker. In fact, after reading the begining of the thread, I came
up with the very same idea.
Phillip J. Eby wrote:
> Read the first sentence again:
>
> "EXPRESSION returns a value that the with statement uses to *create* a
> context" (emphasis added).
>
> It doesn't say that the value *is* the context, and if anything, the
> second excerpt supports that by implying that the context man
32 matches
Mail list logo