On Mon, 2005-03-21 at 17:32 +1200, Greg Ewing wrote:
On 18 March 2005, Donovan Baarda said:
Many Python library methods and classes like select.select(), os.popen2(),
and subprocess.Popen() return and/or operate on builtin file objects.
However even simple applications of these methods and
On Mon, 21 Mar 2005, Donovan Baarda wrote:
I don't agree with that. There's no need to use non-blocking
I/O when using select(), and in fact things are less confusing
if you don't.
You would think that... and the fact that select, popen2 etc all use
file objects encourage you to think
Rule #1: If the docstring is the first line of a
module, it's the module's docstring.
Rule #2: If the docstring comes right before a
class/function, it's that class/function's docstring.
How do you distinguish between a docstring at the
top of a module
that's immediately followed by a
On Mon, 21 Mar 2005, Donovan Baarda wrote:
The only ways to ensure that a select process does not block like this,
without using non-blocking mode, are;
3) Use os.read / os.write.
[...]
but os.read / os.write will block too.
No.
Try it... replace the file
read/writes in
On Mon, 21 Mar 2005 17:32:36 +1200, Greg Ewing
[EMAIL PROTECTED] wrote:
On 18 March 2005, Donovan Baarda said:
The read method's current behaviour needs to be documented, so its actual
behaviour can be used to differentiate between an empty non-blocking read,
and EOF. This means recording
On Monday 21 March 2005 20:08, Nicholas Jacobson wrote:
How do you distinguish between a docstring at the
top of a module
that's immediately followed by a function? Is it
the module docstring
or the function docstring?
It's both. The docstring would be assigned to both
the module
Nicholas Jacobson wrote:
IIRC, Guido once mentioned that he regretted not
setting function docstrings to come before the
function declaration line, instead of after.
He did, but I don't know how strong that regret is.
i.e.
This describes class Bar.
class Bar:
...
Or with a decorator:
This
Nicholas Jacobson wrote:
IIRC, Guido once mentioned that he regretted not
setting function docstrings to come before the
function declaration line, instead of after.
[ examples deleted ]
I think that commenting the function before its
declaration, at the same tabbed point, increases the
code's
I've put a first cut at generator expressions for the AST branch on Sourceforge.
It's enough to get test_grammar to pass, and tinkering at the interactive prompt
appears to work.
The patch also fixes a problem with displaying interim results for functions
entered at the interactive prompt (I
On Mon, 21 Mar 2005 16:08:57 +0100, Thomas Heller [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] writes:
PEP 314 implementation (client side):
I'm not sure where I should post this, but shouldn't there be a way to
specify the encoding of the metadata? There are people (not me,
fortunately),
On Monday 21 March 2005 10:08, Thomas Heller wrote:
I'm not sure where I should post this, but shouldn't there be a way to
specify the encoding of the metadata? There are people (not me,
fortunately), with umlauts in their names, for example.
Agreed. I think there are a number of
For those of you who don't know, I am sprinting on the AST branch here on
PyCon. Specifically, I am fleshing out Python/compile.txt so that it can act
as a good intro to new users and as a design doc.
But one of things I am not sure of is what the marshal_write_*() functions in
On Mon, Mar 21, 2005 at 11:53:04AM -0500, Brett C. wrote:
But one of things I am not sure of is what the marshal_write_*() functions
in Python/Python-ast.c are used for. I assume they output to the marshal
format, but there is mention of a byte stream format and so I thought it
might be
Brett C. wrote:
I am going to be -42 on this one. I personally love having the
docstring below the definition line I can't really rationalize
it beyond just aesthetics at the moment
I completely agree that the current form is better. It reduces the
temptation to use boilerplate
Grant Olson wrote:
Make sure AST is used in the subject line; e.g., [AST] at
the beginning.
Unfortunately the AST group is only available for patches;
not listed for bug reports (don't know why; can this be fixed?).
Other than that, just assign it to me since I will most
likely be doing
Going on with the old bugs checking, here are the results for 2.2.
When I'll finish this will be put in an informational PEP.
When I verified the bug, I filled two fields:
- Summary: the same subject as in SF
- Group: the bug's group at verifying time.
- Bug #: the bug number
- Verified: is the
Nicholas Jacobson wrote:
If a programmer wanted a docstring for the function
but not the module, a blank first line would do the
trick. A docstring for the module but not the
function? Put a blank line between the module's
docstring and the function.
-1 on all this making of blank lines
Donovan Baarda wrote:
Consider the following. This is pretty much the only way you can use
popen2 reliably without knowing specific behaviours of the executed
command;
...
fcntl.fcntl(child_in, fcntl.F_SETFL, flags | os.O_NONBLOCK) # \
... # /
fcntl.fcntl(child_out,
Donovan Baarda wrote:
On Mon, 2005-03-21 at 17:32 +1200, Greg Ewing wrote:
I don't agree with that. There's no need to use non-blocking
I/O when using select(), and in fact things are less confusing
if you don't.
Because staller.py outputs and flushes a fragment of data smaller than
selector.py
On Tue, 2005-03-22 at 12:49 +1200, Greg Ewing wrote:
Donovan Baarda wrote:
Consider the following. This is pretty much the only way you can use
popen2 reliably without knowing specific behaviours of the executed
command;
...
fcntl.fcntl(child_in, fcntl.F_SETFL, flags |
20 matches
Mail list logo