Re: [Python-Dev] Simple Switch statement

2006-06-26 Thread Michael Urman
case id(object): ... case id(None): ... else: switch value: case 1: ... case 'orange': else: raise ValueError Michael -- Michael Urman http://www.tortall.net/mu/blog ___ 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] Is Lib/test/crashers/recursive_call.py really a crasher?

2006-06-27 Thread Michael Hudson
"Brett Cannon" <[EMAIL PROTECTED]> writes: > If you look at that crasher, you will notice that recursion depth is set > to 1 << 30 before any code is run. If you remove that setting high > setting and go with the default then the test doesn't crash and raises the > appropriate RuntimeError. > > S

Re: [Python-Dev] 2.5 and beyond

2006-06-30 Thread Michael Hudson
Ka-Ping Yee <[EMAIL PROTECTED]> writes: > On Fri, 30 Jun 2006, Neal Norwitz wrote: >> The current list of serious bugs are in the PEP: >> >> http://www.python.org/dev/peps/pep-0356/ > > Among them is this one: > > Incorrect LOAD/STORE_GLOBAL generation > http://python.org/sf/1501934 > >

Re: [Python-Dev] Explicit Lexical Scoping (pre-PEP?)

2006-07-05 Thread Michael Chermside
how, in Python only builtins is _really_ global -- even today's global keyword only refers to module scope. So I believe that it would be a very reasonable interpretation of "global" to mean "not local", and implement as "search enclosing scopes in order to find the

Re: [Python-Dev] Explicit Lexical Scoping (pre-PEP?)

2006-07-05 Thread Michael Chermside
I swear it's word-for-word accurate because the quote burned itself into my memory.) -- Michael Chermside ___ 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] Explicit Lexical Scoping (pre-PEP?)

2006-07-05 Thread Michael Chermside
ught, nonetheless. My three-year-old has been working on that 'whee'/'.whee' prohibition, but he hasn't mastered it yet. Gotta-go-wash-another-load-of-underpants -lly yours, Michael Chermside ___ Python-Dev mailing list Python

Re: [Python-Dev] doc for new restricted execution design for Python

2006-07-05 Thread Michael Chermside
rrier? If so, it would simplify a bit of your proposal, and make me feel a little less worried. -- Michael Chermside ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python

[Python-Dev] In defense of Capabilities [was: doc for new restricted execution design for Python]

2006-07-05 Thread Michael Chermside
ion('example.com')) untrusted_object.do_stuff() ... To sum up: I agree that you cannot rely on prevent all the possible "python tricks", but I still think that capabilities are a superior solution. I'd like to find a way to achieve the user-c

Re: [Python-Dev] doc for new restricted execution design for Python

2006-07-06 Thread Michael Chermside
gh about multiple interpreters to be sure -- but somehow I thought they had separate object pools. -- Michael Chermside ___ 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] Restricted execution: what's the threat model?

2006-07-06 Thread Michael Chermside
object references. > D. A given piece of Python code cannot access or communicate > with certain Python objects in the same interpreter. > > E. A given piece of Python code can access only a limited set > of Python objects in the same interpreter. Hmmm. I'm not sure. -- Michael Chermside ___ 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] Explicit Lexical Scoping (pre-PEP?)

2006-07-06 Thread Michael Hudson
Michael Chermside <[EMAIL PROTECTED]> writes: > Phillip Eby writes: >> I don't see a problem with requiring '.x' to be used for both >> reading and writing of outer-scope names; it just shouldn't be >> required for an outer-scope name

Re: [Python-Dev] what can we do to hide the 'file' type?

2006-07-06 Thread Michael Chermside
. We provide a means for obtaining a SecureFileWrapper bound to a given file (perhaps open()). Essentially, we give up on hiding file, which is a frequently-used type, and very hard to hide, and instead we rely on our ability to write a reliably secure "SecureFileWra

Re: [Python-Dev] Explicit Lexical Scoping (pre-PEP?)

2006-07-06 Thread Michael Chermside
I quoted this unwritten bit of Python Zen, attributing it to Tim: > Syntax should not look like grit on my monitor. mwh writes: > I think it was Anthony: > > http://mail.python.org/pipermail/python-dev/2005-July/054581.html But that's not the original. Turns out, it WAS Anthony, and I had mis

Re: [Python-Dev] what can we do to hide the 'file' type?

2006-07-06 Thread Michael Chermside
be sufficient, or if it is valuable to allow end users to fine-tune the restrictions. -- Michael Chermside ___ 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] Multiple expression eval in compound if statement?

2005-06-20 Thread Michael Chermside
Gerrit Holl writes: > What would happen if... Raymond replies: > Every molecule in your body would simultaneously implode at the speed of > light. So you're saying it triggers C-language "undefined behavior"? -- Michael Chermside __

Re: [Python-Dev] Multiple interpreters not compatible with current thread module

2005-06-20 Thread Michael Hudson
Michael Hudson <[EMAIL PROTECTED]> writes: > I'm not expecting anyone else to think hard about this on recent form, > so I'll think about it for a bit and then fix it in the way that seems > best after that. Feel free to surprise me. And so that's what I did.

Re: [Python-Dev] Explicitly declaring expected exceptions for ablock

2005-06-21 Thread Michael Chermside
y: c().foo() except TypeError: fail('Should not have raised TypeError') There ARE situations when you want to allow an exception (but not necessarily expect it) and do nothing when it occurs, but I don't find them all that common, and I certainly don't fin

Re: [Python-Dev] Adding the 'path' module (was Re: Some RFE for review)

2005-06-26 Thread Michael Hoffman
e to use os.path anymore. Reinhold Birkenfeld wrote: > One more issue is open: the one of naming. As "path" is already the > name of a module, what would the new object be called to avoid > confusion? pathobj? objpath? Path? I would argue for Path. It fits with the recent

Re: [Python-Dev] Adding the 'path' module (was Re: Some RFE for review)

2005-06-27 Thread Michael Hoffman
On Sun, 26 Jun 2005, Phillip J. Eby wrote: > At 08:19 PM 6/26/2005 +0100, Michael Hoffman wrote: >> On Sun, 26 Jun 2005, Phillip J. Eby wrote: >> >>> * drop getcwd(); it makes no sense on a path instance >> >> Personally I use path.getcwd() as a class meth

Re: [Python-Dev] subprocess.call() and stdin

2005-06-27 Thread Michael Chermside
then that's one good reason. > It could also be done by adding a subprocess.CLOSED constant, which if > passed to Popen causes a new closed file descriptor to be given to the > subprocess. -1. It is easy enough to create a closed FD to read from... why complicate the API? --

Re: [Python-Dev] Decimal floats as default (was: discussion aboutPEP239 and 240)

2005-06-27 Thread Michael Chermside
use C supplies support for binary FP but does not offer access to the flags and traps), but this is one of those few cases where it's worth using platform-and-compiler specific code. Of course, someone still has to step forward and offer to code it. -- Michael Chermside _

Re: [Python-Dev] Adding the 'path' module (was Re: Some RFE for review)

2005-06-27 Thread Michael Hoffman
On Mon, 27 Jun 2005, Phillip J. Eby wrote: > At 08:20 AM 6/27/2005 +0100, Michael Hoffman wrote: >> os.getcwd() returns a string, but path.getcwd() returns a new path >> object. > > In that case, I'd expect it to be 'path.fromcwd()' or 'path.cwd()'

Re: [Python-Dev] Possible C API problem?

2005-06-27 Thread Michael Hudson
Gary Robinson <[EMAIL PROTECTED]> writes: > That caused a bus error 100% of the time when I simply imported the > module into Python and called getSumChiSquare(), i.e.: > import testfloat testfloat.getSumChiSquare() It doesn't for me (CVS HEAD, OS X Panther). > Could it be that this i

Re: [Python-Dev] Adding the 'path' module (was Re: Some RFEforreview)

2005-06-29 Thread Michael Hoffman
is? I e-mailed Jason earlier this week before submitting the RFE. He said that "I'd like to see path (or something like it) in the standard library." He also said he didn't have time to write a PEP at the moment, but that I should feel free to do so. As for me, I'm happy

Re: [Python-Dev] floatobject.c 2.136

2005-06-29 Thread Michael Hudson
"Raymond Hettinger" <[EMAIL PROTECTED]> writes: > I'm getting a compiler warning from your checkin: "your"? Mine? > C:\py25\Objects\floatobject.c(1430) : warning C4244: 'initializing' : > conversion from 'double ' to 'float ', possible loss of data That's this line: float y = x;

Re: [Python-Dev] Adding Python-Native Threads

2005-06-30 Thread Michael Sparks
hy) that you revisit greenlets - they probably do what you want. Mainly replying to say "-1", Best Regards, Michael. -- Michael Sparks, Senior R&D Engineer, Digital Media Group [EMAIL PROTECTED], http://kamaelia.sourceforge.net/ British Broadcasting Corporation, Research and Develo

Re: [Python-Dev] Terminology for PEP 343

2005-06-30 Thread Michael Hudson
"Raymond Hettinger" <[EMAIL PROTECTED]> writes: > With 343 accepted, we can now add __enter__() and __exit__() methods to > objects. > > What term should describe those objects in the documentation? Hmm, don't know. I talked about an object 'that conformed to the with protocol' at EuroPython,

Re: [Python-Dev] Terminology for PEP 343

2005-07-01 Thread Michael Chermside
#x27;s behavior than "leave". Anyway, this stuff is always very subjective and, as I said, I'm just expressing an opinion. So take it for what it's worth. -- Michael Chermside ___ 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] Terminology for PEP 343

2005-07-03 Thread Michael Hudson
"Phillip J. Eby" <[EMAIL PROTECTED]> writes: > At 05:41 PM 6/30/2005 -0400, Raymond Hettinger wrote: >>With 343 accepted, we can now add __enter__() and __exit__() methods to >>objects. >> >>What term should describe those objects in the documentation? > > Resource managers. Thing is, there may b

Re: [Python-Dev] Terminology for PEP 343

2005-07-03 Thread Michael Walter
How about simply "with block" or "guarded scope" or something like that? Michael On 7/3/05, Ron Adam <[EMAIL PROTECTED]> wrote: > Nick Coghlan wrote: > > > On the other hand 'enter and exit' rolls off the tongue > > significantly better th

Re: [Python-Dev] Terminology for PEP 343

2005-07-03 Thread Michael Hudson
On 3 Jul 2005, at 18:25, Josiah Carlson wrote: > Just because not all cars are used as vehicles, does that mean that > cars > are not vehicles? No, but it means calling all vehicles "cars" is dumb. > There may be cases where the object being managed is not a resource > per-se, but that doesn't

Re: [Python-Dev] Terminology for PEP 343

2005-07-03 Thread Michael Walter
Hmm: "Guarding a scope with a decimal.Context() object ." What do you think? (I'm not sure myself, but we even got a "with" in there :-) Michael On 7/3/05, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > [Michael Walter] > > How about simply "wit

Re: [Python-Dev] Terminology for PEP 343

2005-07-03 Thread Michael Walter
Hmm, I think I'm seeing mostly the (guarded) entry/exit part of "guard" metaphor, but I see what you mean (not allowing "entry", so to say, right?). Not sure. Michael On 7/3/05, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > > "Guarding a scope with

Re: [Python-Dev] Terminology for PEP 343

2005-07-03 Thread Michael Walter
is the guard." > > In predicate calculus, the phrase, "strengthening the guard" has a > specific meaning with the "guard" part being consistent with the above. > One example: > >http://www.cs.utexas.edu/users/psp/unity/notes/07-89.pdf > >

Re: [Python-Dev] Terminology for PEP 343

2005-07-04 Thread Michael Hudson
"Raymond Hettinger" <[EMAIL PROTECTED]> writes: > Another trouble with "resource managed" is that it makes little sense > even when describing something that is clearly a resource (for instance, > "locking objects are resource managed", what the heck could that mean, > there is no hint about the p

Re: [Python-Dev] floatobject.c 2.136

2005-07-04 Thread Michael Hudson
On 4 Jul 2005, at 18:59, Raymond Hettinger wrote: > P.S. I still don't follow the whole yours/mine comment from Michael. > The offending code line was part of 2.136 which CVS says was checked-in > by him on 5/27/2005 and then fixed by him on 6/30/2005. Well, my confusion started

Re: [Python-Dev] Terminology for PEP 343

2005-07-06 Thread Michael Sparks
On Monday 04 Jul 2005 03:10, Phillip J. Eby wrote: > At 03:41 PM 7/3/2005 -0400, Raymond Hettinger wrote: > >[Michael Hudson] > > > This is possible. I just wanted to expand everyone's minds :) > > The mechanism is more general than resourcemanagement. > Expa

Re: [Python-Dev] 'With' context documentation draft (was Re: Terminology for PEP 343

2005-07-06 Thread Michael Chermside
upports 'with' statements I will continue to use "context" to mean lots of different things (eg: decimal.context). By the way, great job Nick... these docs read quite nicely. -- Michael Chermside ___ Python-Dev mailing list Python

Re: [Python-Dev] Possible C API problem?

2005-07-06 Thread Michael Hudson
"Martin v. Löwis" <[EMAIL PROTECTED]> writes: > Gary Robinson wrote: >> Are the docs wrong or am I misreading them? Or are you wrong? > > It turns out that I am wrong. This is a long standing confusion. At one point, the documentation said what you said, and it was just as wrong. There were eve

Re: [Python-Dev] 'With' context documentation draft (was Re: Terminology for PEP 343

2005-07-07 Thread Michael Hudson
Barry Warsaw <[EMAIL PROTECTED]> writes: > +1 on @contextmanager > > On Wed, 2005-07-06 at 19:47, Raymond Hettinger wrote: > >> > __enter__(self): >> > __exit__(self, exc_type, exc_value, exc_traceback): >> >> These names should be changed to __beginwith__ and __endwith__. -1. > -0.

Re: [Python-Dev] C bindings calling tmpfile() blocks interrupt signal

2005-07-07 Thread Michael Hudson
Florent Pillet <[EMAIL PROTECTED]> writes: > I discovered an issue on Mac OS X that seems to relate to signal > handling. I have a C binding in which I call the standard tmpfile() > function. After calling it, I can't break Python anymore with CTRL-C. > Investigating the Darwin source code for tm

Re: [Python-Dev] 'With' context documentation draft (was Re: Terminology for PEP 343

2005-07-08 Thread Michael Hudson
Walter Dörwald <[EMAIL PROTECTED]> writes: > Am 07.07.2005 um 20:00 schrieb Guido van Rossum: > +1 on @contextmanager >> >> +1. >> >> [__enter__, __exit__] >> > These names should be changed to __beginwith__ and __endwith__. > >> >> -1. The PEP has had an extensive review period and

Re: [Python-Dev] 'With' context documentation draft (was Re: Terminology for PEP 343

2005-07-08 Thread Michael Hudson
Walter Dörwald <[EMAIL PROTECTED]> writes: > Michael Hudson wrote: > >> Walter Dörwald <[EMAIL PROTECTED]> writes: >> [...] >>>I.e. will VAR still exist after the end of the block with its value >>>the return value of __enter__() or will it revert

Re: [Python-Dev] Chaining try statements: eltry?

2005-07-08 Thread Michael Hudson
Ron Adam <[EMAIL PROTECTED]> writes: > Guido van Rossum wrote: > >> I even wonder if else-clauses on for/while were a good idea. (The one >> on try is definitely a good idea since the use case is quite frequent >> and only clumsily handled otherwise; the use cases for else on >> for/while are less

Re: [Python-Dev] Possible context managers in stdlib

2005-07-08 Thread Michael Chermside
hreaded programs. This achieves two things: it makes them available to those who need them (not everyone uses threads!), and it rather forcefully makes the point that it's NOT usually a good idea to modify global state info in a context manager beca

Re: [Python-Dev] C bindings calling tmpfile() blocks interrupt signal

2005-07-11 Thread Michael Hudson
Florent Pillet <[EMAIL PROTECTED]> writes: > On 07/07/05, Michael Hudson <[EMAIL PROTECTED]> wrote: >>> >> > But with my threaded Python code, SIGINT doesn't work anymore after my >> > binding has called tmpfile(). >> >> Oh, threads. &

Re: [Python-Dev] Possible context managers in stdlib

2005-07-11 Thread Michael Hudson
Skip Montanaro <[EMAIL PROTECTED]> writes: > Ummm... What's a "context manager"? Something that goes with ... as var: ^ here If you have a better name, feel free to suggest it, but please catch up on python-dev first (it's been discussed to unconsciousness, if not quite death, in the las

Re: [Python-Dev] Linux Python linking with G++?

2005-07-11 Thread Michael Hudson
"Martin v. Löwis" <[EMAIL PROTECTED]> writes: > However, you will find that with a), people will still pass --with-cxx, > because they tend to "enable" all features they can find. --with-fpectl, for example. Does anyone lurking here actually use that, know what it does and require the functional

Re: [Python-Dev] Possible context managers in stdlib

2005-07-11 Thread Michael Chermside
One common example would be to use them only from the main thread. -- Michael Chermside ___ 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] Linux Python linking with G++?

2005-07-12 Thread Michael Hudson
Tim Peters <[EMAIL PROTECTED]> writes: > [Michael Hudson] >> --with-fpectl, for example. Does anyone lurking here actually use >> that, know what it does and require the functionality? Inquiring >> minds want to know. > > I know what it intends to do: Surpr

Re: [Python-Dev] Adding the 'path' module (was Re: Some RFEfor review)

2005-07-12 Thread Michael Chermside
n be simple enough for _me_ to understand it! I think I'm going to go frame this and have it posted in my cubical. -- Michael Chermside ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe:

Re: [Python-Dev] Linux Python linking with G++?

2005-07-13 Thread Michael Hudson
Tim Peters <[EMAIL PROTECTED]> writes: > [Michael Hudson] >>>> --with-fpectl, for example. Does anyone lurking here actually use >>>> that, know what it does and require the functionality? Inquiring >>>> minds want to know. > > [Tim, explains

Re: [Python-Dev] 'With' context documentation draft (was Re: Terminology for PEP 343

2005-07-15 Thread Michael Hudson
"M.-A. Lemburg" <[EMAIL PROTECTED]> writes: > This is exactly what I'm getting at: I can see the potential > use for resource management (which is what started out the > whole idea IIRC), but fail to see why you'd want to use it > for anything more complicated than that. I, as a concrete example,

Re: [Python-Dev] 'With' context documentation draft (was Re: Terminology for PEP 343

2005-07-18 Thread Michael Hudson
Nick Coghlan <[EMAIL PROTECTED]> writes: > Ron Adam wrote: >> 3. The "with" documentation could possibly be grouped with or after >> the "try" documentation as it may be easier to understand in that context. > > I was looking for an appropriate place in the tutorial to put a couple of > usa

Re: [Python-Dev] Information request; Keywords: compiler compiler, EBNF, python, ISO 14977

2005-07-22 Thread Michael Sparks
ng.python instead. Michael. -- Michael Sparks, Senior R&D Engineer, Digital Media Group [EMAIL PROTECTED], http://kamaelia.sourceforge.net/ British Broadcasting Corporation, Research and Development Kingswood Warren, Surrey KT20 6NP This e-mail may contain personal views which are not the vie

Re: [Python-Dev] PEP: Migrating the Python CVS to Subversion

2005-07-29 Thread Michael Hudson
"Martin v. Löwis" <[EMAIL PROTECTED]> writes: > - Subversion over SSH, using SSH key pairs. This would require > to give committers accounts on the machine, which currently is > ruled out by the administration policy of svn.python.org. Would it work/how much risk would it be to create account

Re: [Python-Dev] Extension of struct to handle non byte aligned values?

2005-08-01 Thread Michael Hudson
"George V. Neville-Neil" <[EMAIL PROTECTED]> writes: > Hi, > > I'm attempting to write a Packet class, and a few other classes for > use in writing protocol conformance tests. For the most part this is > going well except that I'd like to be able to pack and unpack byte > strings with values that

Re: [Python-Dev] Pre-PEP: Exception Reorganization for Python 3.0

2005-08-01 Thread Michael Hudson
Willem Broekema <[EMAIL PROTECTED]> writes: > I realize it's major work to add recovery features to the CPython > interpreter, so I don't think CPython will have anything like it soon > and therefore also Python-the-language will not. Instead, my reason > for mentioning this is to get the _concept

Re: [Python-Dev] PEP: Migrating the Python CVS to Subversion

2005-08-02 Thread Michael Hudson
Donovan Baarda <[EMAIL PROTECTED]> writes: > This is why I don't bother migrating any existing CVS projects to SVN; > the benefits don't yet outweigh the pain of migrating. I think they do. I was on dialup for a while, and would have _loved_ Python to be using SVN then -- and given how long diff

Re: [Python-Dev] PEP, take 2: Exception Reorganization for Python 3.0

2005-08-03 Thread Michael Hudson
Guido van Rossum <[EMAIL PROTECTED]> writes: > So here's a radical proposal (hear the scratching of the finglernail > on the blackboard? :-). > > Start with Brett's latest proposal. Goal: keep bare "except:" but > change it to catch only the part of the hierarchy rooted at > StandardError. > > - C

Re: [Python-Dev] PEP 8: exception style

2005-08-07 Thread Michael Hudson
Guido van Rossum <[EMAIL PROTECTED]> writes: > On 8/6/05, A.M. Kuchling <[EMAIL PROTECTED]> wrote: >> PEP 8 doesn't express any preference between the >> two forms of raise statements: >> raise ValueError, 'blah' >> raise ValueError("blah") >> >> I like the second form better, because if the exce

Re: [Python-Dev] Generalised String Coercion

2005-08-08 Thread Michael Hudson
"M.-A. Lemburg" <[EMAIL PROTECTED]> writes: > Set the external encoding for stdin, stdout, stderr: > > (also an example for adding encoding support to an > existing file object): > > def set_sys_std_encoding(encoding): > # Load encoding supp

Re: [Python-Dev] PEP: Migrating the Python CVS to Subversion

2005-08-08 Thread Michael Hudson
Barry Warsaw <[EMAIL PROTECTED]> writes: > Unfortunately, I don't think "we" (meaning specifically the collective > python.org admins) have much if any operational experience with > Perforce. Also (from someone who is on the fringes of the pydotorg admin set): I don't know that much about subvers

Re: [Python-Dev] Major revision of PEP 348 committed

2005-08-09 Thread Michael Hudson
Steven Bethard <[EMAIL PROTECTED]> writes: > Raymond Hettinger wrote: >> If the PEP can't resist the urge to create new intermediate groupings, >> then start by grepping through tons of Python code to find-out which >> exceptions are typically caught on the same line. That would be a >> worthwhil

Re: [Python-Dev] plans for 2.4.2 and 2.5a1

2005-08-12 Thread Michael Hudson
Anthony Baxter <[EMAIL PROTECTED]> writes: > So I'm currently planning for a 2.4.2 sometime around mid September. I figure > we cut a release candidate either on the 7th or 14th, and a final a week > later. Cool. I'm not sure how many outstanding bugs should be fixed before 2.4.2. Some stuff

Re: [Python-Dev] build problems on macosx (CVS HEAD)

2005-08-14 Thread Michael Hudson
Ronald Oussoren <[EMAIL PROTECTED]> writes: > Hi, > > I'm trying to build CVS HEAD on OSX 10.4.2 (Xcode 2.1), with a > checkout that is less than two hours old. I'm building a standard > unix tree (no framework install): It seems very likely that it was this change: http://fisheye.cenqua.com

Re: [Python-Dev] Exception Reorg PEP checked in

2005-08-14 Thread Michael Hudson
Wilfredo Sánchez Vega <[EMAIL PROTECTED]> writes: >I'm curious about why Python lacks FileNotFoundError, > PermissionError and the like as subclasses of IOError. Good question. Lack of effort/inertia? >Catching IOError and looking at errno to figure out what went > wrong seems prett

Re: [Python-Dev] Distributed RCS

2005-08-14 Thread Michael Hudson
"Terry Reedy" <[EMAIL PROTECTED]> writes: > It seems to me that auto testing of the tentatively updated trunk before > final commitment would avoid the 'who checked in test-breaking code' > messages that appear here occasionally. I don't think there's any fundamental impossibility in setting

Re: [Python-Dev] build problems on macosx (CVS HEAD)

2005-08-14 Thread Michael Hudson
"Martin v. Löwis" <[EMAIL PROTECTED]> writes: > Ronald Oussoren wrote: >> I'm trying to build CVS HEAD on OSX 10.4.2 (Xcode 2.1), with a >> checkout that is less than two hours old. I'm building a standard >> unix tree (no framework install): > > I just committed what I think is a bugfix for t

[Python-Dev] SWIG and rlcompleter

2005-08-14 Thread Michael Krasnyk
return matches def get_class_members(klass): --- cut --- Thanks in advance, Michael Krasnyk ___ 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] SWIG and rlcompleter

2005-08-16 Thread Michael Hudson
[EMAIL PROTECTED] writes: > You don't need something like a buggy SWIG to put non-strings in dir(). > class C: pass > ... C.__dict__[3] = "bad wolf" dir(C) > [3, '__doc__', '__module__'] > > This is likely to happen "legitimately", for instance in a class that allows > x.y and x['y'

Re: [Python-Dev] PEP 347: Migration to Subversion

2005-08-16 Thread Michael Hudson
even less: what do the people who frequently check in want? > That means people like you (Martin), Michael, Raymond, Walter, Fred. > ... plus the release manager(s). I want svn, I think. I'm open to more sophisticated approaches but am not sure that any of them are really mature enou

Re: [Python-Dev] PEP 347: Migration to Subversion

2005-08-16 Thread Michael Hudson
Barry Warsaw <[EMAIL PROTECTED]> writes: > On Tue, 2005-08-16 at 07:42, Michael Hudson wrote: > >> The third set of people who count are pydotorg admins. I'm not really >> one of those either at the moment. While SF's CVS setup has it's >> problems

Re: [Python-Dev] [Python-checkins] python/dist/src/Modules _hashopenssl.c, NONE, 2.1 sha256module.c, NONE, 2.1 sha512module.c, NONE, 2.1 md5module.c, 2.35, 2.36 shamodule.c, 2.22, 2.23

2005-08-23 Thread Michael Hudson
"Raymond Hettinger" <[EMAIL PROTECTED]> writes: > This patch should be reverted or fixed so that the Py2.5 build works > again. > > It contains a disasterous search and replace error that prevents it from > compiling. Hence, it couldn't have passed the test suite before being > checked in. It

Re: [Python-Dev] PEP 342 Implementation

2005-08-23 Thread Michael Hudson
"Raymond Hettinger" <[EMAIL PROTECTED]> writes: > Could someone please make an independent check to verify an issue with > the 342 checkin. The test suite passes but when I run IDLE and open a > new window (using Control-N), it crashes and burns. > > The problem does not occur just before the che

Re: [Python-Dev] [Python-checkins] python/dist/src/Modules _hashopenssl.c, NONE, 2.1 sha256module.c, NONE, 2.1 sha512module.c, NONE, 2.1 md5module.c, 2.35, 2.36 shamodule.c, 2.22, 2.23

2005-08-23 Thread Michael Hudson
; from >> > compiling. Hence, it couldn't have passed the test suite before > being >> > checked in. > > [Michael Hudson] >> It works for me, on OS X. Passes the test suite, even. I presume >> you're on Windows of some kind? > >

Re: [Python-Dev] Revised PEP 349: Allow str() to return unicodestrings

2005-08-23 Thread Michael Chermside
e encoding. Lowercase names for encodings are preferred. >>> u"äöü".encode('utf-8') '\xc3\xa4\xc3\xb6\xc3\xbc' I think that if we just took out the example of str() usage and replaced it with a sentence or two that DID introduce the (revised) str() func

Re: [Python-Dev] [Python-checkins] python/dist/src/Modules_hashopenssl.c, NONE, 2.1 sha256module.c, NONE, 2.1 sha512module.c, NONE, 2.1 md5module.c, 2.35, 2.36 shamodule.c, 2.22, 2.23

2005-08-23 Thread Michael Hudson
"Fredrik Lundh" <[EMAIL PROTECTED]> writes: > Gareth McCaughan wrote: > >> It's valid C99, meaning "this is an unsigned long long". > > since when does Python require C99 compilers? Well, it doesn't, but Raymond was suggesting the code was GCC specific, or something. Cheers, mwh -- Check out

Re: [Python-Dev] Bare except clauses in PEP 348

2005-08-24 Thread Michael Chermside
agree that this is unwise because the existing meaning is a tempting trap for the unwary. So I don't see any advantage to keeping bare "except:" in the long run. What we do to ease the transition is a different question, but one more easily resolved. -- Michael Chermside _

Re: [Python-Dev] FW: Bare except clauses in PEP 348

2005-08-24 Thread Michael Chermside
ng to be said for simplicity, and having only one kind of "except" clause for try statements is clearly simpler than having both "except :" and also bare "except:". -- Michael Chermside ___ Python-Dev mailing list Python-De

Re: [Python-Dev] Bare except clauses in PEP 348

2005-08-24 Thread Michael Hudson
"Raymond Hettinger" <[EMAIL PROTECTED]> writes: >> > Hmm, that may not be a killer. I wonder if it is possible to treat >> > BaseException as a constant (like we do with None) and teach the >> > compiler to interpret it as catching anything that gets raised so > that >> > "except BaseException" w

Re: [Python-Dev] Bare except clauses in PEP 348

2005-08-25 Thread Michael Hudson
Guido van Rossum <[EMAIL PROTECTED]> writes: > On 8/24/05, Michael Hudson <[EMAIL PROTECTED]> wrote: >> I really hope string exceptions can be killed off before 3.0. They >> should be fully deprecated in 2.5. > > But what about class exceptions that don't in

Re: [Python-Dev] Bare except clauses in PEP 348

2005-08-25 Thread Michael Chermside
are reasonably exhaustive. If we cannot produce a warning for these, then I'd rather not produce the warning for the use of bare "except:". After all, as it's been pointed out, if the use of bare "except:" is all you are interested in it is quite easy to grep the code t

Re: [Python-Dev] Bare except clauses in PEP 348

2005-08-25 Thread Michael Chermside
Guido: > But how about the following compromise: make it a silent deprecation > in 2.5, and a full deprecation in 2.6. Reinhold Birkenfeld: > That said, I think that unless it is a new feature (like with statements) > transitions to Python 3.0 shouldn't be enforced in the 2.x series. With 3.0, > e

Re: [Python-Dev] Bare except clauses in PEP 348

2005-08-25 Thread Michael Chermside
a fair criticism to me. As we've already noted, it is impossible to replace ALL uses of bare "except:" in 2.5 (particularly the use in code.py that Guido referred to). But we ought to make an extra effort to remove unnecessary uses of b

Re: [Python-Dev] Style for raising exceptions (python-dev Summary for 2005-08-01 through 2005-08-15 [draft])

2005-08-26 Thread Michael Chermside
argument for why we should allow only limited forms in Python 3.0. And next time that I find myself in need of an obfuscated python entry, I've got a great trick up my sleeve. -- Michael Chermside ___ Python-Dev mailing list Python-Dev@python.org h

Re: [Python-Dev] Remove str.find in 3.0?

2005-08-29 Thread Michael Chermside
tion like this one, that you use a new subject header. It will make it easier for the Python-Dev summary authors and for the people who look back in 20 years to ask "That str.partition() function is really swiggy! It's everywhere now, but I wonder what language had it first and who came

Re: [Python-Dev] partition()

2005-08-30 Thread Michael Hudson
"Delaney, Timothy (Tim)" <[EMAIL PROTECTED]> writes: > Phillip J. Eby wrote: > >> +1 for partition(). > > Looks like I'm getting seriously outvoted here ... Still, as I said I > don't think the name is overly important until the idea has been > accepted anyway. How long did we go with people in fa

Re: [Python-Dev] partition() (was: Remove str.find in 3.0?)

2005-08-30 Thread Michael Hoffman
/lib/node114.html > http://docs.python.org/lib/re-objects.html Dare I ask whether the uncompiled versions should be considered for removal in Python 3.0? *puts on his asbestos jacket* -- Michael Hoffman <[EMAIL PROTECTED]> European Bio

Re: [Python-Dev] partition() (was: Remove str.find in 3.0?)

2005-08-30 Thread Michael Chermside
Michael Hoffman writes: > Dare I ask whether the uncompiled versions [of re object methods] should > be considered for removal in Python 3.0? > > *puts on his asbestos jacket* No flames here, but I'd rather leave them. The docs make it clear that the two sets of functions/metho

Re: [Python-Dev] partition()

2005-08-30 Thread Michael Hudson
Nick Coghlan <[EMAIL PROTECTED]> writes: > Michael Hudson wrote: >> partition() works for me. It's not perfect, but it'll do. The idea >> works for me rather more; it even simplifies the >> >> if s.startswith(prefix): >> t = s[len(prefix

[Python-Dev] Revising RE docs (was: partition() (was: Remove str.find in 3.0?))

2005-08-30 Thread Michael Chermside
e, then perhaps someone would be encouraged to supply a patch. -- Michael Chermside ___ 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] Proof of the pudding: str.partition()

2005-08-31 Thread Michael Chermside
e and complain if it weren't). Simplicity and elegence are two of the reasons that this is such an excellent proposal, let's not lose them. We have existing tools (like split() and the re module) to handle the tricky problems. -- Michael Chermside

Re: [Python-Dev] String views

2005-09-01 Thread Michael Chermside
7;re calling "string views". I wonder whether there is a way to instrument a JVM to record how often the underlying buffers are shared, then run some common Java apps. Since the feature is exactly analogous to what is being proposed here,

Re: [Python-Dev] Replacement for print in Python 3.0

2005-09-02 Thread Michael Hoffman
ets, buffers? sure. stdout? Almost never. Almost every program I write produces its output mainly to stdout. And I probably use print half the time to produce this output (the rest is done mostly with csv). GUI widgets? Who needs 'em? -- Michael Hoffman <[E

Re: [Python-Dev] Weekly Python Patch/Bug Summary

2005-09-04 Thread Michael Hudson
"Kurt B. Kaiser" <[EMAIL PROTECTED]> writes: > Patch / Bug Summary > ___ > > Patches : 903 open (+551) / 5222 closed (+2324) / 6125 total (+2875) Err ... ? Cheers, mwh -- LaTeX, pah. Don't be silly. I'm using a homebrew markup system that I wrote in Common Lisp. ;-)

Re: [Python-Dev] Asynchronous use of Traceback objects

2005-09-04 Thread Michael Hudson
Christopher Armstrong <[EMAIL PROTECTED]> writes: > I had the idea to create a fake Traceback object in Python that > doesn't hold references to any frame objects, but is still able to be > passed to 'raise' and formatted as tracebacks are, etc. Unfortunately, > raise does a type check on its thir

Re: [Python-Dev] Replacement for print in Python 3.0

2005-09-06 Thread Michael Hudson
Guido van Rossum <[EMAIL PROTECTED]> writes: > On 9/3/05, Bill Janssen <[EMAIL PROTECTED]> wrote: >> So here's the summary of the arguments against: two style points >> (trailing comma and >>stream) (from the man who approved the current >> decorator syntax!), and it's hard to extend. (By the way

Re: [Python-Dev] Replacement for print in Python 3.0

2005-09-06 Thread Michael Chermside
ity to write in the "Python 3.0 style" (all new-style classes, only raise proper exceptions, etc) in the 2.x series is a VERY useful feature. We want to handle the transition better than Perl. -- Michael Chermside ___ Python-Dev mailing list

Re: [Python-Dev] Hacking print (was: Replacement for print in Python3.0)

2005-09-06 Thread Michael Chermside
d to a stream of unicode characters) and later modified things to allow manual control of the encoding because "modern" operating systems (like Windows) have two distinct file types. Don't blame the language designers, blame the OS folks. -- Michael Chermside

<    12   13   14   15   16   17   18   19   >