Phillip J. Eby wrote:
At 11:48 PM 7/3/2005 -0400, Raymond Hettinger wrote:
with context_expression as variable:
# perform actions within a context
The with statement establishes a context in which some operations are to
be performed.
I like this.
The object produced by
Raymond Hettinger wrote:
With Statements and Suite Management
This is nicely done :-)
Nit: Replace e.g. with such as.
BTW, do you support changing __exit__ to __leave__? I think it provides
a small but useful gain in usability.
I was initially -0 on the idea, and I've moved to a
On Tuesday 05 July 2005 02:57, Greg Ewing wrote:
I'm thinking about something like context manager,
or at least something with context in it.
Oh, I like this one. Context manager / context protocol work well for me.
-Fred
--
Fred L. Drake, Jr. fdrake at acm.org
Hi,
I'm sorry, I don't seem to have done a very good job at explaining
the situation. I'll try again:
'getch()' is a low-level function provided on Windows to capture a
single character of input from a user, /without echoing it to the
screen/. As far as I can tell there's no other way of
* and because Guido believes beginners tend to copy too much
(that is one reason why copy.copy is not a builtin) and that
the language should encourage correct behavior.
OTOH, beginners tend to copy not enough - when for example iterating over a
list being acting upon.
Though my real
Whatever it is that you need 'getch' to do, can't you incorporate it
first in an extension module you bundle with your application or
library, rather than using the (broken?) wrapper in the msvcrt module?
Jeff
pgpArc0XfxgA7.pgp
Description: PGP signature
Aahz wrote:
I was trying to compile a python plugin (for gimp) using the MSYS
shell and the MINGW compiler.
python-dev is the wrong place for this question
Actually, it isn't - he is really asking what the best way of
porting Python to MSYS is.
Regards,
Martin
lode leroy wrote:
maybe someone could extend os.path to do this in the standard distribution:
implement an msyspath.py, which calls ntpath for each function, and does a
replace at the end of the evaluation.
The chances are good that nobody else will work on this - so it is
likely that it is
Gary Robinson wrote:
#include Python.h
static double gfSumChiSquare = 123.0;
static PyObject *
getSumChiSquare(PyObject *self, PyObject *args){
return Py_BuildValue(d, gfSumChiSquare);
}
static PyMethodDef SimMethods[] = {
{getSumChiSquare,
Sorry all,
It seems that the list mods have finally released a duplicate
message that I wrote last week when I wasn't subscribed to the list.
Please ignore the message below if you have read the previous copy
already.
D
On Thu, 2005-06-30 at 09:43 +1200, Darryl Dixon wrote:
Hi,
I'm
On Tue, Jul 05, 2005, Martin v. L?wis wrote:
Aahz wrote:
Martin removed the attribution here:
I was trying to compile a python plugin (for gimp) using the MSYS
shell and the MINGW compiler.
python-dev is the wrong place for this question
Actually, it isn't - he is really asking what the
Aahz wrote:
Hrm. I thought we told people to start with comp.lang.python for
porting questions, but I'm happy to be corrected.
I'm unaware of such a policy, but I may have missed the relevant
discussion. I could understand that questions of the kind I tried
to build Python on X, and the
Arthur wrote:
If the thought is that hiding copy, or relying on idioms for a
construct as fundamental as the list - is a favor to the beginner,
I very much am not.
I don't think anyone believes that. It's more a feeling that
Python shouldn't be cluttered up with things that are *only*
for
Patch / Bug Summary
___
Patches : 348 open ( +4) / 2879 closed ( +4) / 3227 total ( +8)
Bugs: 898 open ( +1) / 5103 closed ( +9) / 6001 total (+10)
RFE : 193 open ( +2) / 170 closed ( +0) / 363 total ( +2)
New / Reopened Patches
__
In general, I find triple-quoted strings to be very handy,
particularly for standalone scripts. However, the fact that they have
to be written in the left-hand column to avoid leading whitespace
really grates, particularly when they're nested within a block or two
-- it's a wart:
try:
On 7/5/05, Andrew Durdin [EMAIL PROTECTED] wrote:
print Usage: dostuff options
Options:
-c - blah blah
-f filename - do stuff with file filename
-s - more blah
Isn't the standard idiom for this already:
import textwrap
...
print textwrap.dedent(\
Usage:
Andrew Durdin [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
In general, I find triple-quoted strings to be very handy,
particularly for standalone scripts. However, the fact that they have
to be written in the left-hand column to avoid leading whitespace
really grates,
17 matches
Mail list logo