[issue27382] calendar module .isleap() probleam

2016-06-24 Thread Dyl Tuckey
Dyl Tuckey added the comment: Thank you ebarry. I would probably never have figured that out -- ___ Python tracker ___ ___ Python-bugs

[issue27382] calendar module .isleap() probleam

2016-06-24 Thread Dyl Tuckey
New submission from Dyl Tuckey: I don't know why but whenever I try and run this code: import calendar import time calendar = calendar.month(2016,6) print ("Loading date, time, month and leap year status") time.sleep(5) print (calendar) localtime = time.asctime(time.localtime(time.time())) print

[issue27382] calendar module .isleap() probleam

2016-06-24 Thread Emanuel Barry
Emanuel Barry added the comment: You're overriding the 'calendar' variable, holding the module, by the result of your 'calender.month' call, which happens to be a str. Use a different variable name (e.g. 'result') and the error will disappear. Unrelated, but don't check for 'if x == True' - ju