Change by Mitchell L Model :
--
assignee: -> docs@python
components: +Documentation
nosy: +docs@python
___
Python tracker
<https://bugs.python.org/issu
New submission from Mitchell L Model :
https://docs.python.org/3/library/string.html#format-examples includes this
line:
'{}, {}, {}'.format('a', 'b', 'c') # 3.1+ only
This does in fact work in 2.7. I don't see anything special about this -- seems
an entirely straightforward format
On Jan 11, 2010, at 1:47 PM Nobody nob...@nowhere.com wrote:
On Mon, 11 Jan 2010 10:09:36 +0100, Martin v. Loewis wrote:
In Python 3.1 is there any difference in the buffering behavior of
the
initial sys.stdout and sys.stderr streams?
No.
Were they different at some earlier point in
On Mar 2, 2010, at 4:48 PM, I wrote:
Can someone tell me how to upload the contents of a (relatively
small) file using an HTML form and CGI in Python 3.1? As far as I
can tell from a half-day of experimenting, browsing, and searching
the Python issue tracker, this is broken.
followed by
Can someone tell me how to upload the contents of a (relatively small)
file using an HTML form and CGI in Python 3.1? As far as I can tell
from a half-day of experimenting, browsing, and searching the Python
issue tracker, this is broken. Very simple example:
html
head
/head
body
An instructive lesson in YAGNI (you aren't going to need it),
premature optimization, and not making assumptions about Python data
structure implementations.
I need a 1000 x 1000 two-dimensional array of objects. (Since they are
instances of application classes it appears that the array
I have been working with Python 3 for over a year. I used it in
writing my book Bioinformatics Programming Using Python (http://oreilly.com/catalog/9780596154509
). I didn't see any point in teaching an incompatible earlier version
of a language in transition. In preparing the book and its
On Jan 28, 2010, at 12:00 PM, python-list-requ...@python.org wrote:
From: Roy Smith r...@panix.com
Date: January 28, 2010 11:09:58 AM EST
To: python-list@python.org
Subject: Re: python 3's adoption
In article mailman.1545.1264694607.28905.python-l...@python.org,
Mitchell L Model mlm
On Jan 28, 2010, at 1:40 PM, Terry Reedy tjre...@udel.edu wrote
...
On 1/28/2010 11:03 AM, Mitchell L Model wrote:
I have been working with Python 3 for over a year. ...
I agree completely.
Such sweet words to read!
Conversion of old code is greatly facilitied by the 2to3 tool
On Jan 15, 2010, at 3:59 PM, Timur Tabi ti...@freescale.com
After reading several web pages and mailing list threads, I've learned
that the webbrowser module does not really support opening local
files, even if I use a file:// URL designator. In most cases,
webbrowser.open() will indeed open
On Jan 27, 2010, at 3:31 PM, Timur Tabi wrote:
On Wed, Jan 27, 2010 at 12:29 PM, Mitchell L Model
mlm...@comcast.net wrote:
I had some discussions with the Python documentation writers that
led to the
following note being included in the Python 3.1 library
documentation
In Python 3.1 is there any difference in the buffering behavior of the
initial sys.stdout and sys.stderr streams? They are both line_buffered
and stdout doesn't seem to use a larger-grain buffering, so they seem
to be identical with respect to buffering. Were they different at some
earlier
On Jan 8, 2010, at 7:35:39 PM EST, Terry Reedy tjre...@udel.edu wrote:
On 1/8/2010 12:02 PM, Mitchell L Model wrote:
On further reflection, I will add that
what appears to be happening is that during import both the global
and
local dictionaries are set to a copy of the globals() from
On Jan 7, 2010, at 10:45 PM, Steven D'Aprano st...@remove-this-cybersource.com.au
wrote an extensive answer to my questions about one function
calling another in the same file being exec'd. His suggestion about
printing out locals() and globals() in the various possible places
provided
On Jan 8, 2010, at 9:55 AM, Gabriel Genellina gagsl-
p...@yahoo.com.ar wrote:
Ok - short answer or long answer?
Short answer: Emulate how modules work. Make globals() same as
locals(). (BTW, are you sure you want the file to run with the
*same* globals as the caller? It sees the
[Python 3.1]
I thought I thoroughly understood eval, exec, globals, and locals, but I
encountered something bewildering today. I have some short files I
want to
exec. (Users of my application write them, and the application gives
them a
command that opens a file dialog box and execs the
I forgot to offer one answer for question [3] in what I just posted: I
can define all the secondary functions inside one main one and just
call the main one. That provides a separate local scope within the
main function, with the secondary functions defined inside it when
(each time) the
[Continuing the discussion about super() and __init__]
The documentation of super points out that good design of diamond patterns
require the methods to have the same signature throughout the diamond. That's
fine for non-mixin classes where the diamond captures different ways of
handling the
In Python 3, how should super() be used to invoke a method defined in C that
overrides its two superclasses A and B, in particular __init__?
class A:
def __init__(self):
print('A')
class B:
def __init__(self):
print('B')
class C(A, B):
Allow me to add to my previous question that certainly the superclass
methods can be called explicitly without resorting to super(), e.g.:
class C(A, B):
def __init__(self):
A.__init__(self)
B.__init__(self)
My question is really whether there is any way of
From: Scott David Daniels scott.dani...@acm.org
Date: Tue, 30 Jun 2009 16:49:18 -0700
Message-ID: ieudnfm_j89ep9fxnz2dnuvz_g6dn...@pdx.net
Subject: Re: invoking a method from two superclasses
Mitchell L Model wrote:
In Python 3, how should super() be used to invoke a method defined in C
Suppose I have a simple query in sqlite3 in a function:
def lookupxy(x, y):
conn.execute(SELECT * FROM table WHERE COL1 = ? AND COL2 = ?,
(x, y))
However, COL2 might be NULL. I can't figure out a value for y that would
retrieve rows for which COL2 is NULL. It
22 matches
Mail list logo