On Mon, Jun 22, 2010 at 7:27:31 PM, Steven D'Aprano st...@pearwood.info wrote:
On Tue, 22 Jun 2010 08:03:58 am Nick Coghlan wrote:
So, to boil down the ebytes idea, it is basically a request for a
second string type that holds an octet stream plus an encoding name,
rather than a Unicode
On Thu, Apr 16, 2009 at 8:01 PM, Jess Austin jess.aus...@gmail.com wrote:
These operations are useful in particular contexts. What I've
submitted is also useful, and currently isn't easy in core,
batteries-included python. While I would consider the foregoing
interpretation of the Zen
execution.
thanks,
Jess Austin
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
On Thu, Apr 16, 2009 at 3:45 AM, s...@pobox.com wrote:
date(2008, 1, 30) + monthdelta(1)
datetime.date(2008, 2, 29)
What would this loop would print?
for d in range(1, 32):
print date(2008, 1, d) + monthdelta(1)
for d in range(1, 32):
... print(date(2008, 1, d) +
On Thu, Apr 16, 2009 at 5:16 AM, Dirkjan Ochtman dirk...@ochtman.nl wrote:
On Thu, Apr 16, 2009 at 11:54, Amaury Forgeot d'Arc amaur...@gmail.com
wrote:
In my opinion:
arithmetic with months is a mess. There is no such month interval or
year interval with a precise definition.
If we adopt
Thanks for everyone's comments!
On Thu, Apr 16, 2009 at 9:54 AM, Paul Moore p.f.mo...@gmail.com wrote:
I like the idea in principle. In practice, of course, month
calculations are inherently ill-defined, so you need to be very
specific in documenting all of the edge cases, and you should have
Jared Grubb jared.gr...@gmail.com wrote:
On 16 Apr 2009, at 11:42, Paul Moore wrote:
The key thing missing (I believe) from dateutil is any equivalent of
monthmod.
I agree with that. It's well-defined and it makes a lot of sense. +1
But, I dont think monthdelta can be made to work... what
Jon Ribbens jon+python-...@unequivocal.co.uk wrote:
On Thu, Apr 16, 2009 at 12:10:36PM +0400, Oleg Broytmann wrote:
This patch adds a monthdelta class and a monthmod function to the
datetime module. The monthdelta class is much like the existing
timedelta class, except that it represents
Antoine Pitrou solip...@pitrou.net wrote:
Jess Austin jess.austin at gmail.com writes:
What other behavior options besides last-valid-day-of-the-month
would you like to see?
IMHO, the question is rather what the use case is for the behaviour you are
proposing. In which kind of situation
On Thu, Apr 16, 2009 at 7:18 PM, s...@pobox.com wrote:
I have this funny feeling that arithmetic using monthdelta wouldn't
always be intuitive.
Jess I think that's true, especially since these calculations are not
Jess necessarily invertible:
date(2008, 1, 30) +
at
Issue 5520 to completely apply. It will fail one test without the
patch at Issue 5516. Both of these are (inexpertly) linked from the
roundup page for this issue.
I hope this will be helpful.
cheers,
Jess Austin
___
Python-Dev mailing list
Python-Dev
Alex wrote:
On Apr 4, 2006, at 10:53 PM, Jess Austin wrote:
Alex wrote:
import collections
def tally(seq):
d = collections.defaultdict(int)
for item in seq:
d[item] += 1
return dict(d)
I'll stop lurking and submit the following:
def tally(seq
Alex wrote:
import collections
def tally(seq):
d = collections.defaultdict(int)
for item in seq:
d[item] += 1
return dict(d)
I'll stop lurking and submit the following:
def tally(seq):
return dict((group[0], len(tuple(group[1])))
for group in
13 matches
Mail list logo