On Fri, Aug 8, 2008 at 1:34 AM, Christopher Spears
<[EMAIL PROTECTED]> wrote:
> Ok, here is the working version of my program. Thanks for all of the advice:
>
> #!/usr/bin/python
>
> import time
>
> class date_format(object):
This is a bit of a misnomer, you aren't formatting the date, you are
p
ot;__main__":
print "Welcome to the Date Formatter!"
month = raw_input("Please enter a month (as a number): ")
day = raw_input("Please enter a day: ")
year = raw_input("Please enter a year: ")
da
On Thu, 7 Aug 2008, bob gailer wrote:
Christopher Spears wrote:
Hey,
I'm working on a problem out of Core Python Programming (2nd Edition).
Basically, I'm creating a class that formats dates. Here is what I have so
far:
Consider reformatting the month_dict so each name and abbreviatio
Christopher Spears wrote:
Hey,
I'm working on a problem out of Core Python Programming (2nd Edition).
Basically, I'm creating a class that formats dates. Here is what I have so far:
Consider reformatting the month_dict so each name and abbreviation is a
key. Then you can just look up th
>try:
>month = int(month)
>except ValueError:
>for eachKey in month_dict.keys():
>if month.lower() in eachKey:
>month = month_dict[eachKey]
>
On Wed, Aug 6, 2008 at 11:01 PM, Christopher Spears
<[EMAIL PROTECTED]> wrote:
> Hey,
>
> I'm working on a problem out of Core Python Programming (2nd Edition).
> Basically, I'm creating a class that formats dates. Here is what I have so
> far:
>
> #!/usr/bin/python
>
> import time
>
> class da
Hey,
I'm working on a problem out of Core Python Programming (2nd Edition).
Basically, I'm creating a class that formats dates. Here is what I have so far:
#!/usr/bin/python
import time
class date_format(object):
def __init__(self, month, day, year):
month_dict = {("j