>> def read_and_unpack(stream, format):
>> data = stream.read(struct.calcsize(format))
>> return struct.unpack(format, data)
>>
>>> Otherwise, I'm +1 on your suggestion, avoiding copying is a good
>>> thing.
>>
>> I believe my function also doesn't involve any unnecessary copies.
> You just
On 30/10/2010 06:56, Raymond Hettinger wrote:
On Oct 29, 2010, at 9:11 PM, Michael Foord wrote:
Just to clarify. The following fails in Python 3:
sorted([3, 1, 2, None])
If you want to compare that two iterables containing heterogeneous
types have the same members then it is tricky to implem
You just moved your copying down one level into stream.read().
This magic function must be implemented by possibly concatenating several
"socket.recv()" calls.
This invariably involves data copying, either by "".join() or stringio.write()
K
-Original Message-
From: python-dev-bounces+kris
On Oct 31, 2010, at 04:39 PM, Eric Smith wrote:
>What are your thoughts on adding a str.format_from_mapping (or similar
>name, maybe the suggested "format_map") to 3.2?
+1 for the shorter name.
-Barry
signature.asc
Description: PGP signature
___
Pyth
On Oct 31, 2010, at 09:54 AM, Gregory P. Smith wrote:
>> - moving the documentation to an "advanced" or "complete reference" section
>>
>
>Agreed, I perfer simply deemphasizing these methods by reorganizing the
>documentation and mentioning in their documentation to, "just use
>assertEqual." De-d
2010/10/31 Glenn Linderman :
> On 10/31/2010 3:32 PM, Eric Smith wrote:
>
> On 10/31/2010 6:28 PM, Glenn Linderman wrote:
>
> On 10/31/2010 2:02 PM, Benjamin Peterson wrote:
>
> 2010/10/31 Antoine Pitrou:
>
>> On Sun, 31 Oct 2010 16:39:44 -0400
>> Eric Smith wrote:
>>
>
>>> What are your though
On 10/30/2010 4:08 PM, Martin v. Löwis wrote:
>> I think size should be in TCHARs, not in bytes. (MSDN says so)
>> And GetComputerName's signature differs from MSDN. (Maybe should
>> use GetComputerNameExW again?)
>
> You are right. So how about this patch?
Still not quite right. The call to GetC
On 10/31/2010 3:32 PM, Eric Smith wrote:
On 10/31/2010 6:28 PM, Glenn Linderman wrote:
On 10/31/2010 2:02 PM, Benjamin Peterson wrote:
2010/10/31 Antoine Pitrou:
> On Sun, 31 Oct 2010 16:39:44 -0400
> Eric Smith wrote:
>
>> What are your thoughts on adding a str.format_from_mapping (or
si
Raymond Hettinger wrote:
> I looked at this again and think we should just remove
> assertItemsEqual() from Py3.2 and dedocument it in Py2.7. It is listed
> as being new in 3.2 so nothing is lost.
One thing that would be lost is that correct Python 2.7 code using
assertItemsEqual would no longe
On 10/31/2010 6:28 PM, Glenn Linderman wrote:
On 10/31/2010 2:02 PM, Benjamin Peterson wrote:
2010/10/31 Antoine Pitrou:
> On Sun, 31 Oct 2010 16:39:44 -0400
> Eric Smith wrote:
>
>> What are your thoughts on adding a str.format_from_mapping (or similar
>> name, maybe the suggested "forma
2010/10/31 Glenn Linderman :
> On 10/31/2010 2:02 PM, Benjamin Peterson wrote:
>
> 2010/10/31 Antoine Pitrou :
>
>> On Sun, 31 Oct 2010 16:39:44 -0400
>> Eric Smith wrote:
>>
>
>>> What are your thoughts on adding a str.format_from_mapping (or similar
>>> name, maybe the suggested "format_map") to
On 10/31/2010 2:02 PM, Benjamin Peterson wrote:
2010/10/31 Antoine Pitrou:
> On Sun, 31 Oct 2010 16:39:44 -0400
> Eric Smith wrote:
>
>> What are your thoughts on adding a str.format_from_mapping (or similar
>> name, maybe the suggested "format_map") to 3.2? See
>> http://bugs.python.org/
On Sun, Oct 31, 2010 at 5:23 PM, raymond.hettinger
wrote:
..
> + For some use cases, there a good alternatives to :func:`sum`.
This sentence is missing a verb.
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/p
On 10/31/2010 1:44 PM, Antoine Pitrou wrote:
On Sun, 31 Oct 2010 18:15:43 +0100 (CET)
benjamin.peterson wrote:
# SimSMTPChannel doesn't fully support LOGIN or CRAM-MD5 auth because they
# require a synchronous read to obtain the credentials...so instead smtpd
@@ -503,6 +504,7 @@
On Sun, 31 Oct 2010 16:02:08 -0500
Benjamin Peterson wrote:
> 2010/10/31 Antoine Pitrou :
> > On Sun, 31 Oct 2010 16:39:44 -0400
> > Eric Smith wrote:
> >
> >> What are your thoughts on adding a str.format_from_mapping (or similar
> >> name, maybe the suggested "format_map") to 3.2? See
> >> htt
2010/10/31 Antoine Pitrou :
> On Sun, 31 Oct 2010 16:39:44 -0400
> Eric Smith wrote:
>
>> What are your thoughts on adding a str.format_from_mapping (or similar
>> name, maybe the suggested "format_map") to 3.2? See
>> http://bugs.python.org/issue6081 . This method would be similar to
>> "%(foo)s
On Sun, 31 Oct 2010 16:39:44 -0400
Eric Smith wrote:
> What are your thoughts on adding a str.format_from_mapping (or similar
> name, maybe the suggested "format_map") to 3.2? See
> http://bugs.python.org/issue6081 . This method would be similar to
> "%(foo)s %(bar)s" % d, where d is a dict (o
What are your thoughts on adding a str.format_from_mapping (or similar
name, maybe the suggested "format_map") to 3.2? See
http://bugs.python.org/issue6081 . This method would be similar to
"%(foo)s %(bar)s" % d, where d is a dict (or rather any mapping object),
but of course would use str.form
The regression tests for py3k (or, I think, any branch) fail on one of
my machines because test_grp chokes if /etc/group contains a "+" line,
which is a directive to pull information from NIS.
The test enumerates all entries in /etc/group using grp.getgrall() and
verifies that it can look up each
On Sun, 31 Oct 2010 18:15:43 +0100 (CET)
benjamin.peterson wrote:
>
> # SimSMTPChannel doesn't fully support LOGIN or CRAM-MD5 auth because
> they
> # require a synchronous read to obtain the credentials...so instead smtpd
> @@ -503,6 +504,7 @@
> except smtplib.SMTPAuthentica
On Sun, Oct 31, 2010 at 9:11 AM, Barry Warsaw wrote:
> On Oct 29, 2010, at 08:14 PM, Raymond Hettinger wrote:
>
> >I would like to simplify and clean-up the API for the unittest module
> >by de-documenting assertSetEqual(), assertDictEqual(),
> >assertListEqual, and assertTupleEqual().
>
> As a g
On Oct 29, 2010, at 04:23 PM, Benjamin Peterson wrote:
>At the moment, I'm planning to do regular maintenance releases for 3.1 and
>2.7 roughly every 6 months.
Cool. The actual interval doesn't matter as much as the regularity. I say
that speaking as a semi-former RM who sadly didn't adhere to
On Oct 29, 2010, at 08:14 PM, Raymond Hettinger wrote:
>I would like to simplify and clean-up the API for the unittest module
>by de-documenting assertSetEqual(), assertDictEqual(),
>assertListEqual, and assertTupleEqual().
As a general principle, I think all public API methods should be document
On Sun, 31 Oct 2010 14:55:34 -, Vinay Sajip wrote:
> Olemis Lang gmail.com> writes:
> > On Fri, Oct 29, 2010 at 10:07 AM, Barry Warsaw python.org>
> > wrote:
> > > I haven't played with it yet, but do you think it makes sense to add a
> > > 'style' keyword argument to basicConfig()? Â That
On Mon, Nov 1, 2010 at 12:55 AM, Brian Curtin wrote:
>
> It gets created in the try block above, so the file was being created twice
> but deleted once.
Ah, right. My brain read that "else:" as an except clause for some
reason (possibly a sign that I should have gone to bed a while
ago...).
Chee
Olemis Lang gmail.com> writes:
>
> On Fri, Oct 29, 2010 at 10:07 AM, Barry Warsaw python.org> wrote:
> > I haven't played with it yet, but do you think it makes sense to add a
> > 'style' keyword argument to basicConfig()? That would make it pretty easy
> > to get the formatting style you want
On Sun, Oct 31, 2010 at 09:20, Nick Coghlan wrote:
> On Sun, Oct 31, 2010 at 9:56 AM, brian.curtin
> wrote:
> > Author: brian.curtin
> > Date: Sun Oct 31 01:56:45 2010
> > New Revision: 86000
> >
> > Log:
> > Fix ResourceWarning about unclosed file
> >
> >
> > Modified:
> > python/branches/py3
Eric Smith trueblade.com> writes:
> I keep meaning to review this but haven't had time. One thing I want to
> look at specifically is the ability to put the time formatting into the
> str.format version of the format string. Now that the time format
> specifier can be included in the format st
On Mon, Nov 1, 2010 at 12:01 AM, Nick Coghlan wrote:
> On Fri, Oct 29, 2010 at 10:38 AM, victor.stinner
> wrote:
>> try:
>> - path_list = env.get('PATH')
>> + # ignore BytesWarning warning
>> + with warnings.catch_warnings(record=True):
>> + path_list = env.get
On Sun, Oct 31, 2010 at 9:56 AM, brian.curtin
wrote:
> Author: brian.curtin
> Date: Sun Oct 31 01:56:45 2010
> New Revision: 86000
>
> Log:
> Fix ResourceWarning about unclosed file
>
>
> Modified:
> python/branches/py3k/Lib/test/test_fileio.py
>
> Modified: python/branches/py3k/Lib/test/test_fi
On Fri, Oct 29, 2010 at 10:38 AM, victor.stinner
wrote:
> try:
> - path_list = env.get('PATH')
> + # ignore BytesWarning warning
> + with warnings.catch_warnings(record=True):
> + path_list = env.get('PATH')
This looks odd to me. You're requesting that the warn
On Sun, Oct 31, 2010 at 10:41 AM, Terry Reedy wrote:
> The few issues that would get such a 2.7+ tag can just as well be marked
> 2.7/closed/postponed.
Using closed+postponed as the resolution for 2.x specific feature
requests sounds fine.
Feature requests that are also applicable to 3.x can jus
32 matches
Mail list logo