On Sun, Jun 12, 2011 at 6:56 AM, benjamin.peterson
python-check...@python.org wrote:
summary:
allow fake filenames in findsource (closes #9284)
This allows findsource() to work in doctests.
A patch from Dirkjan Ochtman.
Either this exception should be mentioned in the inspect.getsource()
2011/6/12 Nick Coghlan ncogh...@gmail.com:
On Sun, Jun 12, 2011 at 6:56 AM, benjamin.peterson
python-check...@python.org wrote:
summary:
allow fake filenames in findsource (closes #9284)
This allows findsource() to work in doctests.
A patch from Dirkjan Ochtman.
Either this exception
On Mon, Jun 13, 2011 at 1:31 AM, Benjamin Peterson benja...@python.org wrote:
I should have made more clear in the message that this is actually a
regression from 2.6.
Actually looking at the inspect docs, I'm not sure where such a note
would fit anyway. I'll think about it a bit more - I have
For example, the logging module is not very useful right now, as it requires
sprinkling small one-liners all over my code - not exactly ideal.
Why not take a page from aspect-oriented programming and allow for injection
of code with point cuts?
___
Hi.
We extensively use the struct module to crunch large amounts of binary
data. There are basically two operations for us that only seem to the
naked eye as one: Filtering (see if certain fields have certain
values, throw everything away if not) and inspection (care about all
the fields'
On Sat, Jun 11, 2011 at 10:29, Jiawei Li jiawei.h...@gmail.com wrote:
For example, the logging module is not very useful right now, as it requires
sprinkling small one-liners all over my code - not exactly ideal.
Why not take a page from aspect-oriented programming and allow for injection
of
Hi! This mailing list is to work on developing Python (discussing bugs
and patches). There is python-ideas mailing list to discuss possible
future improvements.
Oleg.
--
Oleg Broytmanhttp://phdru.name/p...@phdru.name
Programmers don't die, they just GOSUB
Guido van Rossum wrote:
On Thu, May 19, 2011 at 1:43 AM, Nick Coghlan wrote:
Proposals to address this include:
- introduce a character literal to allow c'a' as an alternative to ord('a')
-1; the result is not a *character* but an integer. I'm personally
favoring using b'a'[0] and possibly
On Jun 12, 2011, at 8:29 AM, Lukas Lueg wrote:
Hi.
We extensively use the struct module to crunch large amounts of binary
data. There are basically two operations for us that only seem to the
naked eye as one: Filtering (see if certain fields have certain
values, throw everything away if
# constants
EOH = b'\r'[0]
CHAR = b'C'[0]
DATE = b'D'[0]
FLOAT = b'F'[0]
INT = b'I'[0]
LOGICAL = b'L'[0]
MEMO = b'M'[0]
NUMBER = b'N'[0]
This is not beautiful code.
In this case, I think the intent would be better captured with
def ASCII(c):
return c.encode('ascii')
EOH =
EOH = b'\r'[0]
CHAR = b'C'[0]
DATE = b'D'[0]
FLOAT = b'F'[0]
INT = b'I'[0]
LOGICAL = b'L'[0]
MEMO = b'M'[0]
NUMBER = b'N'[0]
This is not beautiful code.
You still have the alternative
EOH = ord('\r')
CHAR = ord('C')
...
which looks fine to me.
Cheers,
Hagen
On behalf of the Python development team, I'm rosy to announce the immediate
availability of Python 2.7.2.
Since the release candidate 2 weeks ago, there have been 2 changes:
1. pyexpat.__version__ has be changed to be the Python version. 2. A regression
from 3.1.3 in the handling of comments in
On behalf of the Python development team, I'm sanguine to announce a release
candidate for the fourth bugfix release for the Python 3.1 series, Python 3.1.4.
Since the 3.1.4 release candidate 2 weeks ago, there have been three changes:
1. test_zipfile has been fixed on systems with an ASCII
This is what people normally do (unpack just the values they need,
when they need them).
Due to the fact that there hundreds of format-strings which
dynamically compiled from a more verbose language at runtime, we will
have significant complexity in the code in order to generate format
strings
On 6/12/2011 1:57 PM, Benjamin Peterson wrote:
To download Python 2.7.2 visit:
http://www.python.org/download/releases/2.7.1/
That should be
http://www.python.org/download/releases/2.7.2/
--
Terry Jan Reedy
___
Python-Dev mailing list
On 12 June 2011 18:58, Benjamin Peterson benja...@python.org wrote:
On behalf of the Python development team, I'm sanguine to announce a release
candidate for the fourth bugfix release for the Python 3.1 series, Python
3.1.4.
Is this actually a RC, or is that a typo?
Paul.
2011/6/12 Paul Moore p.f.mo...@gmail.com:
On 12 June 2011 18:58, Benjamin Peterson benja...@python.org wrote:
On behalf of the Python development team, I'm sanguine to announce a release
candidate for the fourth bugfix release for the Python 3.1 series, Python
3.1.4.
Is this actually a RC,
On 6/12/2011 11:29 AM, Lukas Lueg wrote:
This sort of speculative idea might fit the python-ideas list better.
[Summary: we often need to extract a field or two from a binary record
in order to decide whether to toss it or unpack it all and process.]
One solution to this is using two
If no one is using it, I'd like to delete it. I also don't think we
should be in business of distributing distribution specific files.
--
Regards,
Benjamin
___
Python-Dev mailing list
Python-Dev@python.org
Am 12.06.2011 22:37, schrieb Benjamin Peterson:
I also don't think we
should be in business of distributing distribution specific files.
I disagree. We certainly include PCbuild/*.vcproj, and Tools/msi,
which are also distribution-specific. Likewise, we have plenty
of OSX-specific files
2011/6/12 Martin v. Löwis mar...@v.loewis.de:
Am 12.06.2011 22:37, schrieb Benjamin Peterson:
I also don't think we
should be in business of distributing distribution specific files.
I disagree. We certainly include PCbuild/*.vcproj, and Tools/msi,
which are also distribution-specific.
Guido van Rossum wrote:
On Thu, May 19, 2011 at 1:43 AM, Nick Coghlan wrote:
Proposals to address this include:
- introduce a character literal to allow c'a' as an alternative to
ord('a')
-1; the result is not a *character* but an integer.
Would you be happier if it were spelled i'a'
Raymond Hettinger wrote:
The problem you're trying to solve isn't unique to structs.
That's why we get periodic requests for ropes-like behaviors
I don't think he's asking for rope-like behaviour here.
Rather, he's asking for iterator-like or view-like
behaviour -- for the same reasons we
On Jun 12, 2011, at 3:18 PM, Greg Ewing wrote:
Raymond Hettinger wrote:
The problem you're trying to solve isn't unique to structs.
That's why we get periodic requests for ropes-like behaviors
I don't think he's asking for rope-like behaviour here.
How would you describe the creation of
Benjamin Peterson writes:
I should qualify: We shouldn't distribute distribution-specific files
for which we don't provide binaries.
Probably it belongs in a contrib area of the tree, but one of the
things I find really annoying about distros is the way they refuse to
use my perfectly good
Ethan Furman writes:
Using this method, my code now looks like:
# constants
[...]
This is not beautiful code.
Put mascara on a pig, and you have a pig with mascara on, not Bette
Davis. I don't necessarily think you're doing anybody a service by
making the hack of using ASCII bytes as
On Mon, Jun 13, 2011 at 3:18 AM, Ethan Furman et...@stoneleaf.us wrote:
This is not beautiful code.
Agreed, but:
EOH, CHAR, DATE, FLOAT, INT, LOGICAL, MEMO, NUMBER = b'\rCDFILMN'
is a shorter way to write the same thing.
Going two per line makes it easier to mentally map the characters:
On Mon, Jun 13, 2011 at 6:31 AM, Terry Reedy tjre...@udel.edu wrote:
With just 1 or 2 filter fields, and very many other fields, I would just
unpack everything, including the filter field. I expect the extra time to do
that would be comparalbe to the extra time to combine. It certainly would
28 matches
Mail list logo