Re: [Python-Dev] Rounding float to int directly ...

2006-08-02 Thread Michael Chermside
ze out more digits of precision per bit of storage than decimal floats, or that binary floats are faster because they are supported by specialized hardware, then I'd go along, but they're not a "better model". -- Michael Chermside ___

Re: [Python-Dev] Rounding float to int directly ...

2006-08-02 Thread Michael Chermside
hat it is always trumped by adding another digit of precision to your numbers / lookup tables / whatever. If so, then even more credit needs to be given to the system that supports adjustable precision (the Decimal module). -- Michael Chermside ___ Pyt

[Python-Dev] Dicts are broken Was: unicode hell/mixing str and unicode asdictionarykeys

2006-08-04 Thread Michael Chermside
hen later in the code we could do things like this: language = 'en' dayOfWeek = DaysOfWeek.Mon month = Months.Jan dayOfMonth = 3 print '%s, %s %s' % ( translations[dayOfWeek][language], translations[month][language], dayOfMonth) # this works in 2.4 but fails in 2.5 - end problem_with_dicts.py Please reconsider. -- 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] Dicts are broken Was: unicode hell/mixing str and unicode asdictionarykeys

2006-08-04 Thread Michael Chermside
Marc-Andre Lemburg writes: > How about generating a warning instead and then go for the exception > in 2.6 ? Agreed. Michael Hudson's explanation convinced me. -- Michael Chermside ___ Python-Dev mailing list Python-Dev@pyth

Re: [Python-Dev] Dict suppressing exceptions

2006-08-10 Thread Michael Chermside
use an exception after one more release when people have had time to fix their code. -- 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] Dict suppressing exceptions

2006-08-11 Thread Michael Chermside
icode but let everyone else using objects that raise exceptions suffer), but I think it would be more friendly to use warnings for now and exceptions after another full release cycle. The warnings should solve the underlying issue (hard-to-debug problems). -- Michael Chermside _

Re: [Python-Dev] Elementtree and Namespaces in 2.5

2006-08-11 Thread Michael Chermside
to release ElementTree in the stdlib exactly as it is in 2.5 and change it for 2.6. -- 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] Dict suppressing exceptions

2006-08-11 Thread Michael Chermside
I think we should note this policy someplace official -- perhaps in the Language Reference where __eq__ and __lt__ are defined. But I do not think that these changes should be made until Py3K. What do others think? Is this the "right" approach? --

Re: [Python-Dev] Fwd: Problem withthe API for str.rpartition()

2006-09-05 Thread Michael Chermside
ke this: S.partition(sep) -> (head, sep, tail) S.rpartition(sep) -> (tail, sep, rest) Perhaps someone else can find something clearer than my suggestion, but in my own head, the terms "head" and "tail" are tighly bound with the idea of beginning and end (respective

Re: [Python-Dev] PEP: Adding data-type objects to Python

2006-10-31 Thread Michael Chermside
up the good work! Some day I'd like to see NumPy built in to the standard Python distribution. The incremental, PEP by PEP approach you are taking is the best route to getting there. But there may be some changes along the way -- convergence with ctypes may be one of

Re: [Python-Dev] re: 2.4 news reaches interesting places

2004-12-17 Thread Michael Chermside
but which at the same time manages to associate the word "fast" with "Python". -- Michael Chermside ___ Python-Dev mailing list [EMAIL PROTECTED] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

RE: [Python-Dev] Re: [Csv] Minor change to behaviour of csv module

2005-01-07 Thread Michael Chermside
Can't we treat this misbehavior as an outright bug? -- 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] Re: Subscribing to PEP updates

2005-01-10 Thread Michael Chermside
t and let's see if that does the trick. I just got notification of the change to PEP 246 (and I haven't received other checkin notifications), so I guess I can report that this is working. Thanks, Barry. Should we now mention this on c.l.py for others who ma

RE: [Python-Dev] PEP 246, redux

2005-01-11 Thread Michael Chermside
But in my world, people occasionally misuse adaptation because they think they know what they're doing or because they're in a big hurry and it's the most convenient tool at hand. I wish I lived in your world, but I don't. -- Michael Chermside [1] - Except for Eiffel.

RE: [Python-Dev] PEP 246, redux

2005-01-11 Thread Michael Chermside
than class inheritance (which of course is used more > often). Do you want to prohibit interface inheritance, too? Hmm. Sounds like you're making a point here that's important, but which I don't quite get. Can you elaborate? I certainly hadn't intended to prohibit interf

Re: [Python-Dev] PEP 246, redux

2005-01-11 Thread Michael Chermside
st, but "LiskovViolation" in the exception name seems unbeatably clear and concise. -- Michael Chermside ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org

RE: [Python-Dev] PEP 246, redux

2005-01-12 Thread Michael Chermside
" in this case short of prohibiting interface inheritance entirely. And, as Phillip points out to me (see above) this is a more common type of error. Gee... I'm understanding the problem a little better, but elegant solutions are still escaping me. -- 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] Re: PEP 246: LiskovViolation as a name

2005-01-12 Thread Michael Chermside
s not true. Guido writes: > How about SubstitutabilityError? It would be less precise and informative to ME but apparently more so to a beginner. Obviously, we should support the beginner! -- Michael Chermside ___ Python-Dev mailing lis

RE: [Python-Dev] Python Interpreter Thread Safety?

2005-01-28 Thread Michael Chermside
lity, so we are jumping through hoops to ensure that even this old code which is violating the rules doesn't get broken. -- Michael Chermside ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubsc

RE: Moving towards Python 3.0 (was Re: [Python-Dev] Speed up functioncalls)

2005-01-31 Thread Michael Chermside
good IPC library that makes it easier to write programs that launch "threads" as separate processes and communicate with them. No change to the internals, just a new library to encourage people to use the technique that already works. -- Michael Chermside

RE: [Python-Dev] license issues with profiler.py and md5.h/md5c.c

2005-02-11 Thread Michael Chermside
n't comment on whether this applies to libmd. -- 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] Re: [Python Dev] PEP 309

2005-03-03 Thread Michael Chermside
propose it! Let's alias map, filter, and reduce into the functional module now that it exists. This doesn't create any need or pressure to remove these as builtins, but it does contemplate a day when we might choose to make such a choice. -- Michael Chermside

RE: [Python-Dev] Re: Useful thread project for 2.5?

2005-03-08 Thread Michael Chermside
y >>> func(3,4) Warning (from warnings module): File "g:/Documents/Personal/Python/deprecated.py", line 10 warnings.warn("Call to deprecated function.") UserWarning: Call to deprecated function. 7 So... shall I go add this to the cookbook? -- Michael

RE: [Python-Dev] Re: @deprecated

2005-03-09 Thread Michael Chermside
only > complains if it is called... True enough. And java doesn't complain at all if the deprecated function is invoked via reflection. It's a fundamental difference in style between the two languages: Python barely even HAS a "compile phas

Re: [Python-Dev] RELEASED Python 2.4.1, release candidate 1

2005-03-11 Thread Michael Chermside
locations, repairs, uninstalls, single-user and all-user installs, and I found no problems anywhere. Nice work! -- Michael Chermside ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: ht

[Python-Dev] (no subject)

2005-03-14 Thread Michael Chermside
& 0x8 ...and I suspect (experimentation seems to confirm this) that if you mangle these then the code object won't work correctly. If anyone's got a suggestion for fixing this, I'd love to hear it. -- Michael Chermside ___ Python-De

RE: [Python-Dev] Rationale for sum()'s design?

2005-03-15 Thread Michael Chermside
s (besides which, we'd still need to handle the empty list). So I'm in favor of REMOVING the second argument of sum() for python 3000, unless it was kept purely for "backward compatibility" reasons, which would be defeated by changing it&#x

RE: [Python-Dev] @decoration of classes

2005-03-28 Thread Michael Chermside
people normally want to do with classes (like support for inheritance. But a few *good* use cases would change my mind. -- 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] Re: switch statement

2005-04-21 Thread Michael Chermside
before I could begin to consider it. If I understand it properly, pattern matching in Haskell relies primarily on Haskell's excellent typing system, which is absent in Python. -- Michael Chermside ___ Python-Dev mailing list Python-Dev@python.org htt

RE: [Python-Dev] Re: switch statement

2005-04-21 Thread Michael Chermside
handle_undefine() elif re.match('[A-Za-z][A-Za-z0-9]*$', s): handle_identifier() else: syntax_error() would be might be nice, but I can't figure out how to make it work more efficiently than the simple if-elif-else structure, nor an elegent syntax. -- Michael Chermside

RE: [Python-Dev] defmacro (was: Anonymous blocks)

2005-04-25 Thread Michael Chermside
t make it easier to evaluate syntax suggestions. And if the answer is that we want to prohibit nothing, then the right solution is macros. -- Michael Chermside ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/pytho

RE: [Python-Dev] defmacro (was: Anonymous blocks)

2005-04-25 Thread Michael Chermside
I'd be happy with a function-call like syntax for including the macro. Well, that's a lot of "wanting"... now I all I need to do is invent a clever syntax that allows these in an elegant fashion while also solving Guido's point about imports (hint: the answer is that it ALL happens at runtime). I'll go think some while you guys zoom past me again. -- 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] Re: switch statement

2005-04-27 Thread Michael Chermside
default() |y = 4 is the repetition of "x ==" and of "y =". As my earlier example demonstrates, a structure like this in which the "x ==" or the "y =" VARIES has a totally different *meaning* to the programmer than one in which the "x =="

[Python-Dev] Example for PEP 343

2005-05-17 Thread Michael Chermside
ed convince me that allowing the use of generators instead of classes with the "do_template" decorator is quite nice in practice, even though it gets confusing (for beginners anyhow) if you start to think about it too much. -- Michael Chermside # = SAMPLE #1: increasing preci

Re: [Python-Dev] Example for PEP 343

2005-05-18 Thread Michael Chermside
be done with higher precision, AND causes any variables set during the block will retain their higher precision. (It's because context controls OPERATIONS but changing context never affects individual Decimal OBJECTS.) So I fear that the whole with_extra_precision() idea is just likely to tempt

Re: [Python-Dev] Simpler finalization semantics (was Re: PEP 343 -Abstract Block Redux)

2005-05-18 Thread Michael Chermside
thought "Well, what's the harm in letting the variable survive the 'with' statement?" I'm a big fan of keeping namespaces "clean", but it's just not important enough to incurr other penalties. So in this case, I (reluctantly, after givin

Re: [Python-Dev] Simpler finalization semantics (was Re: PEP 343 - Abstract Block Redux)

2005-05-18 Thread Michael Chermside
oing nothing. I CLEARLY intended to do the appropriate cleanup (or locking, or whatever), but it doesn't happen. -- Michael Chermside ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe:

Re: [Python-Dev] Adventures with Decimal

2005-05-20 Thread Michael Chermside
ct context precision? (By the way... even if other constructors begin to respect context precision, the constructor from tuple should NOT -- it exists to provide low-level access to the implementation. I'll express no opinion on the constructor from Decimal, because I don't understand the

Re: [Python-Dev] Adventures with Decimal

2005-05-20 Thread Michael Chermside
an't make more time for this now. I understand! > The short course is that > a module purporting to implement an external standard should not > deviate from that standard without very good reasons Yes, but should we think of the constructor-from-string

Re: [Python-Dev] Adventures with Decimal

2005-05-20 Thread Michael Chermside
object: >>> import decimal >>> decimal.getcontext().prec = 4 >>> decimal.getcontext().create_decimal("1.234567890") Decimal("1.235") Frankly, I have no idea WHAT purpose is served by passing a context to the decimal constructor... I didn

Re: [Python-Dev] Adventures with Decimal

2005-05-23 Thread Michael Chermside
ds, make FULL use of the context in the constructor if a context is provided, but make NO use of the thread context when no context is provided. -- One final point... Thanks to Mike Cowlishaw for chiming in with a detailed and well-considered explanation of his thoughts on the matter. -- M

Re: [Python-Dev] PEP 344: Explicit vs. Implicit Chaining

2005-05-23 Thread Michael Chermside
ver something new goes wrong. This is the only way I've found to work around the problem in Java. Wouldn't it be nice if Python could do better? -- Michael Chermside ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/m

Re: [Python-Dev] Closing old bugs

2005-06-02 Thread Michael Chermside
and there are only 5-10 open bugs, we can send intrepid volunteers digging through the archives to examine bugs that got closed without proper investigation. I'm not holding my breath. -- Michael Chermside ___ Python-Dev mailing list

Re: [Python-Dev] Multiple expression eval in compound if statement?

2005-06-13 Thread Michael Chermside
e side effect going on here, I don't see it. What am I missing? -- 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-13 Thread Michael Chermside
4-10 values though, so O(1) and O(n) may not be THAT different. It's one of those cases where the only thing I'd really believe was experiments done on real code. But it's a cool optimization if it actually pays off. -- Michael Chermside ___ Py

Re: [Python-Dev] Wishlist: dowhile

2005-06-13 Thread Michael Chermside
code I immediately thought that it WAS the straightforward way to write that code, and that I was just not smart enough to have realized it until he showed me. -- Michael Chermside ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mai

Re: [Python-Dev] Wishlist: dowhile

2005-06-14 Thread Michael Chermside
> f2.write(chunk) What ever happened to "Not every 3 line function needs to be a builtin"? It's a common pattern. It's easy to do. Where's the problem? -- Michael Chermside ___ Python-Dev mailing list Python-Dev@py

Re: [Python-Dev] Proposal: defaultdict

2006-02-17 Thread Michael Chermside
ion it is that is still undecided). If a _trivial_ decision is already made, there's no need for a PEP, but if a difficult decision has been made, then documenting it in a PEP saves years of having to justify it to newbies. -- Michael Chermside ___ Python

Re: [Python-Dev] defaultdict and on_missing()

2006-02-22 Thread Michael Chermside
A minor related point about on_missing(): Haven't we learned from regrets over the .next() method of iterators that all "magically" invoked methods should be named using the __xxx__ pattern? Shouldn't it be named __on_missing__() instead?

Re: [Python-Dev] defaultdict and on_missing()

2006-02-23 Thread Michael Chermside
howed that it would have been better the other way. -- 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] bytes.from_hex()

2006-03-01 Thread Michael Chermside
3.0 where text == unicode? Um... yes. Sorry, I'm not completely used to 3.0 yet. I'll need to borrow the time machine for a little longer before my fingers really pick up on the 3.0 names and idioms. -- Michael Chermside ___ Python-Dev mailing li

Re: [Python-Dev] iterator API in Py3.0

2006-03-03 Thread Michael Chermside
n of builtins (adding one more for next() won't hurt, but if we make a practice of it we'll eventually have too many). All told, I prefer using the underscores. I think that the first invariant is important. But it's a judgement call, and a close one, so I'll be

Re: [Python-Dev] .len() instead of __len__() (was: iterator API inPy3.0)

2006-03-06 Thread Michael Chermside
hose as identifiers in your code. Avoid only that portion of the builtin namespace that you feel is worth keeping. -- 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

[Python-Dev] (no subject)

2006-03-06 Thread Michael Chermside
;absolute_import" in self.futures) The only USE I have ever seen for code obscurity was in writing certain vote-counting software where the true behavior needed to remain obscure even in the face of source code publication.[1] -- Michael Chermside [1] http://graphics.stanford.edu/~danielrh/v

Re: [Python-Dev] Coverity Open Source Defect Scan of Python

2006-03-13 Thread Michael Chermside
jects in hopes of selling it for money to comercial projects is a WONDERFUL business model. Good luck! -- Michael Chermside (PS: too bad I can't buy stock in Coverity. How come all the GOOD companies are private? I had to wait around 6 years before I could buy stock in Google.)

Re: [Python-Dev] Threading idea -- exposing a global thread lock

2006-03-14 Thread Michael Chermside
bt we're going to convince Sun or Microsoft to change their approach to threading, I think it is unwise to build such a feature into the Python language. Supporting it in CPython only requires (I think) no more than a very simple C extension. I think it should stay as an exte

Re: [Python-Dev] GeneratorExit inheriting from Exception

2006-03-20 Thread Michael Chermside
skillful Java programmers out there. Yet it is rare to see them write "catch Throwable" when they should use "catch Exception". That mistake is far more common among beginning Python users. Surely we can do at least as well as Java! -- Michael Chermside PS: I've intentionall

Re: [Python-Dev] pysqlite for 2.5?

2006-03-29 Thread Michael Chermside
abase.duras database.oracle there's no need to group the SQL databases. -- Michael Chermside ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/op

Re: [Python-Dev] Class decorators

2006-03-31 Thread Michael Chermside
pointing out what should have been obvious to me from the start. The ability to use callable objects as functions is a powerful tool in Python, and ought not be broken by decorator inconsistencies. -- Michael Chermside ___ Python-Dev mailing l

Re: [Python-Dev] PEP 3101 Update

2006-05-08 Thread Michael Chermside
eyword argument: > > "{0:{1}.{2}d}".format(a, b, c) This violates the specification given above... it has non-escaped '}' characters. Make up one rule and be consistant. -- Michael Chermside ___ Python-Dev mailing list

Re: [Python-Dev] PEP 3101 Update

2006-05-08 Thread Michael Chermside
he basic format() method and I would have tried to take one small step at a time. But please don't read this as saying I object to the above ideas... I wouldn't have said anything if you hadn't asked what my approach would be. -- Michael Chermside _

Re: [Python-Dev] feature request: inspect.isgenerator

2006-06-01 Thread Michael Chermside
(x) I presume that Michele's proposal is that inspect.isgenerator() (or perhaps "inspect.isgenfunc()") would return True for "foo" and "bar" but false for "foo_or_bar". Can you give a single use case for

Re: [Python-Dev] Python Benchmarks

2006-06-02 Thread Michael Chermside
o think carefully about such things, and the documentation on the option should give a good explanation of the tradeoffs or at least a link to such an explanation. -- Michael Chermside ___ Python-Dev mailing list Python-Dev@python.org http://mail.pyth

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] 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] 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] 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] 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] '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 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] 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] 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] 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] 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-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
[PLEASE IGNORE PREVIOUS EMAIL... I HIT [Send] BY MISTAKE] 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 Pytho

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() (was: Remove str.find in 3.0?)

2005-08-30 Thread Michael Chermside
ort simple scripts. Nearly everything I write these days is larger and more complex, but I retain a soft spot for short simple scripts and want Python to continue to be the best tool available for these tasks. -- Michael Chermside ___ Python-Dev mailing

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

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

2005-09-08 Thread Michael Chermside
lize that slice literals are allowed only within subscripts and thus do not conflict with this use. -- 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] PEP 3000 and new style classes

2005-09-09 Thread Michael Chermside
minor incompatibilities no matter how hard we try, but just imagine how the Perl5 users today would feel if they were told that they could use Perl6 code in the Perl5 interpreter by using the "@ .fture. <<" command. I love making Perl users jealous, so I certainly wouldn't vote

Re: [Python-Dev] Simplify the file-like-object interface

2005-09-13 Thread Michael Chermside
tinction is supported by the basic file operations in the C library. To open a text file in binary mode is technically an error (although in many OSs you'll get away with it). -- Michael Chermside ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] list splicing

2005-09-19 Thread Michael Chermside
this is a FRF (Frequently Requested Feature). I'm not arguing in favor of it, just pointing out that using "star unpacking" in tuple and list literals is an idea that I'm sure I've seen proposed at least a couple of times before. This doesn't necessarily make it a good id

  1   2   >