ian douglas wrote:
It bugs me that so many people are quick to jump on the "we wont' do
your homework" bandwagon -- I was accused of the same thing when I
posted a question to the list myself. I've been programming
professionally for many years but learning Python in my spare time... I
sent th
> As far as I can tell from quickly going through documentation, no. At
> least, not with a quick and easy function. datetime can represent the
> dates just fine, and you can add days to that until you hit your end
> date, but adding months is harder. timedelta can't represent a month,
> which make
On Wed, Feb 2, 2011 at 2:55 AM, Sean Carolan wrote:
>> This sounds somewhat like homework. If it is, that's fine, mention it,
>> and we will help you. But we won't do your homework for you, so keep
>> that in mind.
>
> A reasonable assumption but this is actually going in a cgi tool that
> I'm usi
On Wed, Feb 2, 2011 at 2:30 AM, ian douglas wrote:
> It bugs me that so many people are quick to jump on the "we wont' do your
> homework" bandwagon -- I was accused of the same thing when I posted a
> question to the list myself. I've been programming professionally for many
> years but learning
> This sounds somewhat like homework. If it is, that's fine, mention it,
> and we will help you. But we won't do your homework for you, so keep
> that in mind.
A reasonable assumption but this is actually going in a cgi tool that
I'm using at work. The input comes from pull-down menus on a web
pa
It bugs me that so many people are quick to jump on the "we wont' do
your homework" bandwagon -- I was accused of the same thing when I
posted a question to the list myself. I've been programming
professionally for many years but learning Python in my spare time... I
sent this reply to Sean pri
--- On Tue, 2/1/11, Sean Carolan wrote:
> From: Sean Carolan
> Subject: [Tutor] Help with range of months spanning across years
> To: Tutor@python.org
> Date: Tuesday, February 1, 2011, 6:19 PM
> I have a function that accepts four
> arguments, namely startmonth,
> sta
"Hugo Arts" wrote
What would be the most straightforward way to create a list of
year/month pairs from start to end? I want to end up with a list of
tuples like this:
mylist = [(2009, 8), (2009, 9), (2009, 10), (2009, 11), (2009, 12),
(2010, 1)]
That said, you can do this rather straightf
On Wed, Feb 2, 2011 at 12:19 AM, Sean Carolan wrote:
> I have a function that accepts four arguments, namely startmonth,
> startyear, endmonth, and endyear. For example:
>
> startmonth = 8
> startyear = 2009
> endmonth = 1
> endyear = 2010
>
> What would be the most straightforward way to create
I have a function that accepts four arguments, namely startmonth,
startyear, endmonth, and endyear. For example:
startmonth = 8
startyear = 2009
endmonth = 1
endyear = 2010
What would be the most straightforward way to create a list of
year/month pairs from start to end? I want to end up with a
10 matches
Mail list logo