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

2006-10-31 Thread Michael Chermside
easy way to construct or to interrogate ctypes objects from C is a legitimate complaint... and if you can define your requirements, it should be relatively easy to add a C interface to meet those needs. -- Michael Chermside ___ Python-Dev mailing list

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

2006-09-05 Thread Michael Chermside
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 (respectively) rather than with the idea of small part chopped off and big part that is still choppable. -- Michael Chermside

Re: [Python-Dev] Dict suppressing exceptions

2006-08-11 Thread Michael Chermside
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 ___ Python-Dev mailing

Re: [Python-Dev] Dict suppressing exceptions

2006-08-11 Thread Michael Chermside
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? -- Michael Chermside

Re: [Python-Dev] Dict suppressing exceptions

2006-08-10 Thread Michael Chermside
will not help with my example. I'm not sure the motivation for breaking code like that example -- the bug-hunting motivation is satisfied by issuing a warning as Michael Urman proposes, then use an exception after one more release when people have had time to fix their code. -- Michael Chermside

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

2006-08-04 Thread Michael Chermside
. -- 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@python.org http

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

2006-08-02 Thread Michael Chermside
they are supported by specialized hardware, then I'd go along, but they're not a better model. -- Michael Chermside ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman

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

2006-08-02 Thread Michael Chermside
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 ___ Python-Dev mailing list Python-Dev@python.org http

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

2006-07-06 Thread Michael Chermside
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
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

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

2006-07-06 Thread Michael Chermside
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 SecureFileWrapper class (in C). -- Michael Chermside

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

2006-07-05 Thread Michael Chermside
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
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-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev

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

2006-07-05 Thread Michael Chermside
, 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.org/mailman/options

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

2006-07-05 Thread Michael Chermside
to achieve the user-customizability of capabilities without throwing out the entire standard library -- maybe some hybrid of resource hiding and resource crippling. I can almost see a way to achieve it, but there are still a few flaws. -- Michael Chermside

Re: [Python-Dev] Python Benchmarks

2006-06-02 Thread Michael Chermside
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.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python

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

2006-06-01 Thread Michael Chermside
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 which that distinction is desirable? -- Michael Chermside ___ Python-Dev

Re: [Python-Dev] PEP 3101 Update

2006-05-08 Thread Michael Chermside
) This violates the specification given above... it has non-escaped '}' characters. Make up one rule and be consistant. -- Michael Chermside ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http

Re: [Python-Dev] PEP 3101 Update

2006-05-08 Thread Michael Chermside
to the above ideas... I wouldn't have said anything if you hadn't asked what my approach would be. -- Michael Chermside ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http

Re: [Python-Dev] Class decorators

2006-03-31 Thread Michael Chermside
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 list Python-Dev@python.org http://mail.python.org

Re: [Python-Dev] pysqlite for 2.5?

2006-03-29 Thread Michael Chermside
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/options/python-dev/archive

Re: [Python-Dev] GeneratorExit inheriting from Exception

2006-03-20 Thread Michael Chermside
, there are literally hundreds of thousands of not-very-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

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

2006-03-14 Thread Michael Chermside
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 extension and not become part of the language. -- Michael Chermside

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

2006-03-13 Thread Michael Chermside
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.) ___ Python-Dev mailing list Python-Dev@python.org http

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

2006-03-06 Thread Michael Chermside
. -- 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
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/vote/scores.html ___ Python-Dev mailing list Python-Dev@python.org

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

2006-03-03 Thread Michael Chermside
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 happy with either decision. -- Michael Chermside

Re: [Python-Dev] bytes.from_hex()

2006-03-01 Thread Michael Chermside
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 list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python

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

2006-02-23 Thread Michael Chermside
. -- 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] 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? -- Michael Chermside

Re: [Python-Dev] Proposal: defaultdict

2006-02-17 Thread Michael Chermside
). 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-Dev mailing list Python-Dev

Re: [Python-Dev] a quit that actually quits

2005-12-29 Thread Michael Chermside
if we're honest about what are the accidents -- every language or software package has some, and just because it's an accident does NOT mean we should fix it. -- Michael Chermside ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org

Re: [Python-Dev] status of development documentation

2005-12-22 Thread Michael Chermside
would be simpler. Of course, the person who REALLY gets to decide how it works isn't me; it's whoever decides to spend the time to BUILD this system. -- Michael Chermside ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman

Re: [Python-Dev] status of development documentation

2005-12-22 Thread Michael Chermside
this particular note belongs to so the doc editors can read only the ones that people thought ought to be included in the docs. -- Michael Chermside ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe

Re: [Python-Dev] Sets are mappings?

2005-12-21 Thread Michael Chermside
) use cases for abstract base classes of fundamental types. -- 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

Re: [Python-Dev] Sets are mappings?

2005-12-21 Thread Michael Chermside
__len__. Perhaps the container uses an algorithm to generate the items and is effectively of infinite size. In your hierarchy, this wouldn't even be a basecontainer (and thus, clearly not a basesequence). But if all you want to do is to use __getitem__ then it ought to work fine. -- Michael Chermside

Re: [Python-Dev] PEP 8 updates/clarifications, function/method style

2005-12-14 Thread Michael Chermside
the conversation that preceded putting that into PEP 8, and the impetus for that particular decision was input from non-native English speakers (particularly those not coming from a European alphabet) that it was far easier to read with underscore separation rather than capWords. -- Michael Chermside

Re: [Python-Dev] PEP 8 updates/clarifications, function/method style

2005-12-14 Thread Michael Chermside
_do_ believe that the lack of such conventions is a bit distracting. (Not enough to make me prefer Java, of course!) -- Michael Chermside ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe

Re: [Python-Dev] ElementTree in stdlib

2005-12-14 Thread Michael Chermside
the user specially imports the pure-python version. Perhaps importing xml.etree gets you cElementTree unless that isn't compiled on your platform, but you can import xml.pure_python.etree or something like that to get the pure Python version if you really want it. -- Michael Chermside

[Python-Dev] (no subject)

2005-11-10 Thread Michael Chermside
handle either choice. If others felt like me, then its likely that the backward compatibility argument and the need to fight the pervasive meme that Python is slow will win the day. -- Michael Chermside ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] apparent ruminations on mutable immutables (was:PEP 351, the freeze protocol)

2005-11-02 Thread Michael Chermside
that works well with Python would NOT be rejected. The idea is interesting, and it _may_ be sound; only an actual implementation could prove this either way. -- Michael Chermside ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman

Re: [Python-Dev] Why should the default hash(x) == id(x)?

2005-11-02 Thread Michael Chermside
common in most situations. A beneficial side-effect is that the default behavior of __eq__ is QUITE simple to explain, and if the implementation is easy to explain then it may be a good idea. -- Michael Chermside ___ Python-Dev mailing list Python-Dev

Re: [Python-Dev] Proposed resolutions for open PEP 343 issues

2005-10-26 Thread Michael Chermside
, and there wouldn't have been any need for discussion. Oh yeah, and you can also put extra info into an exception object besides just the error message. (We don't do that as often as we should... it's a powerful technique.) -- Michael Chermside ___ Python-Dev

Re: [Python-Dev] Autoloading? (Making Queue.Queue easier to use)

2005-10-12 Thread Michael Chermside
by renaming it until 3.0 arrives. -- 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] Autoloading? (Making Queue.Queue easier to use)

2005-10-12 Thread Michael Chermside
Aahz writes: I'm suggesting that we add a doc note that using the thread module is discouraged and that it will be renamed in 3.0. Then we're apparently all in agreement. -- Michael Chermside ___ Python-Dev mailing list Python-Dev@python.org http

Re: [Python-Dev] bool(container) [was bool(iter([])) changedbetween 2.3 and 2.4]

2005-09-30 Thread Michael Chermside
and Queue.Queues are True... it follows the general rule that everything is true except the above (short) list of objects and user-defined (or library) classes that want to mimic the behavior of one of these or have some obvious meaning for non-true. -- Michael Chermside

Re: [Python-Dev] Adding a conditional expression in Py3.0

2005-09-29 Thread Michael Chermside
opinion. Thanks Guido, for maintaining your patience in the face of this discussion. -- Michael Chermside ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman

Re: [Python-Dev] list splicing

2005-09-19 Thread Michael Chermside
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 idea, nor a bad one. -- Michael Chermside ___ Python-Dev mailing list Python-Dev

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

2005-09-13 Thread Michael Chermside
is technically an error (although in many OSs you'll get away with it). -- 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

Re: [Python-Dev] PEP 3000 and new style classes

2005-09-09 Thread Michael Chermside
interpreter by using the @ .fture. command. I love making Perl users jealous, so I certainly wouldn't vote less than -0 (I don't care so why bother) on a proposal like this one. -- Michael Chermside ___ Python-Dev mailing list Python-Dev@python.org http

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

2005-09-08 Thread Michael Chermside
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

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

2005-09-06 Thread Michael Chermside
because modern operating systems (like Windows) have two distinct file types. Don't blame the language designers, blame the OS folks. -- Michael Chermside ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev

Re: [Python-Dev] String views

2005-09-01 Thread Michael Chermside
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, I would find such such analysis very helpful. -- Michael Chermside ___ Python-Dev

Re: [Python-Dev] Proof of the pudding: str.partition()

2005-08-31 Thread Michael Chermside
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 ___ Python-Dev mailing list

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

2005-08-30 Thread Michael Chermside
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 list Python-Dev@python.org http

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

2005-08-30 Thread Michael Chermside
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] Remove str.find in 3.0?

2005-08-29 Thread Michael Chermside
, 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 up with it? -- Michael Chermside

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

2005-08-25 Thread Michael Chermside
, if the use of bare except: is all you are interested in it is quite easy to grep the code to find all uses. -- Michael Chermside ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http

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 Python

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

2005-08-24 Thread Michael Chermside
. 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 ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org

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

2005-08-24 Thread Michael Chermside
, and having only one kind of except clause for try statements is clearly simpler than having both except some-exception-type: and also bare except:. -- Michael Chermside ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo

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

2005-08-23 Thread Michael Chermside
it with a sentence or two that DID introduce the (revised) str() function, it ought to work. In particular, it could mention that you can call str() on any object, which isn't stated here at all. -- Michael Chermside ___ Python-Dev mailing list Python-Dev

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

2005-07-12 Thread Michael Chermside
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: http://mail.python.org/mailman/options/python-dev/archive

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

2005-07-11 Thread Michael Chermside
. -- 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] Possible context managers in stdlib

2005-07-08 Thread Michael Chermside
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 because doing so is not generally threadsafe. -- Michael Chermside ___ Python-Dev

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

2005-07-06 Thread Michael Chermside
... these docs read quite nicely. -- 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-01 Thread Michael Chermside
the door dividing outside from inside. If you accept this connotation, then it's clear that exit is a closer match for the with statement'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

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

2005-06-27 Thread Michael Chermside
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? -- Michael Chermside ___ Python-Dev mailing list Python

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

2005-06-27 Thread Michael Chermside
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 ___ Python-Dev mailing list

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

2005-06-21 Thread Michael Chermside
: 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 find them arising in unit tests. -- Michael Chermside

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 ___ Python-Dev mailing

Re: [Python-Dev] Wishlist: dowhile

2005-06-14 Thread Michael Chermside
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@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe

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

2005-06-13 Thread Michael Chermside
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
done on real code. But it's a cool optimization if it actually pays off. -- 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

Re: [Python-Dev] Wishlist: dowhile

2005-06-13 Thread Michael Chermside
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/mailman/listinfo/python-dev Unsubscribe: http

Re: [Python-Dev] Closing old bugs

2005-06-02 Thread Michael Chermside
to examine bugs that got closed without proper investigation. I'm not holding my breath. -- 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] Adventures with Decimal

2005-05-23 Thread Michael Chermside
in with a detailed and well-considered explanation of his thoughts on the matter. -- 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

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

2005-05-23 Thread Michael Chermside
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/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail

Re: [Python-Dev] Adventures with Decimal

2005-05-20 Thread Michael Chermside
? (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 issues.) -- Michael Chermside

Re: [Python-Dev] Adventures with Decimal

2005-05-20 Thread Michael Chermside
: 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't even realize it was allowed! -- Michael Chermside

Re: [Python-Dev] Example for PEP 343

2005-05-18 Thread Michael Chermside
Decimal OBJECTS.) So I fear that the whole with_extra_precision() idea is just likely to tempt people into introducing subtle bugs, and it should probably be scrapped anyhow. Guido's approach to save-and- restore context works fine. -- Michael Chermside (PS: Another reason that I avoided a basic

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

2005-05-18 Thread Michael Chermside
not important enough to incurr other penalties. So in this case, I (reluctantly, after giving myself quite a talking-to) favor having the 'with' statement with VAR create said variable in the appropriate scope as a side-effect, much like 'for'. -- Michael Chermside

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

2005-05-18 Thread Michael Chermside
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: http://mail.python.org/mailman/options/python-dev

[Python-Dev] Example for PEP 343

2005-05-17 Thread Michael Chermside
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 precision during a sub-calculation = import

RE: [Python-Dev] Re: switch statement

2005-04-27 Thread Michael Chermside
== or the y = VARIES has a totally different *meaning* to the programmer than one in which the x == or y = is the same for every single branch. But let's not start discussing conditional expressions now, because there's already more traffic on the list than I can read. -- Michael Chermside

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

2005-04-25 Thread Michael Chermside
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/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive

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

2005-04-25 Thread Michael Chermside
. 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. wink -- Michael

RE: [Python-Dev] Re: switch statement

2005-04-21 Thread Michael Chermside
for Python 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-Dev] (no subject)

2005-03-14 Thread Michael Chermside
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-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev

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

2005-03-11 Thread Michael Chermside
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: http://mail.python.org/mailman/options/python-dev/archive%40mail

RE: [Python-Dev] Re: @deprecated

2005-03-09 Thread Michael Chermside
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 phase, and Python programs tend to be far more dynamic than Java. -- Michael Chermside ___ Python-Dev

RE: [Python-Dev] Re: [Python Dev] PEP 309

2005-03-03 Thread Michael Chermside
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 ___ Python-Dev

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

2005-02-11 Thread Michael Chermside
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] Python Interpreter Thread Safety?

2005-01-28 Thread Michael Chermside
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 Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive

RE: [Python-Dev] PEP 246, redux

2005-01-11 Thread Michael Chermside
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. Eiffel seems to do a pretty good job of enforcing

Re: [Python-Dev] PEP 246, redux

2005-01-11 Thread Michael Chermside
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/mailman/options/python-dev/archive%40mail-archive.com

RE: [Python-Dev] Re: Subscribing to PEP updates

2005-01-10 Thread Michael Chermside
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 may be interested? -- Michael Chermside

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

2005-01-07 Thread Michael Chermside
? -- 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