Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
02-28-2014, 06:10 AM #1
- Join Date
- Feb 2014
- Thanked 0 Times in 0 Posts
How to make python ignore undefined attributes.
Im working on a grid based zork game and am very new to coding. if i did something like this
location_y = 1 * limit_y
and limit_y is not defined, is there an easy way to make python ignore limit_y if it is not defined making location_y = 1
Thanks for the help! it is greatly appreciated.
03-21-2014, 12:32 PM #2Code:
try: location_y = 1 * limit_y except: location_y = 1
limit_y = 1I am a Man of Truth. I am a Free Human Person. I am a Peacemaker.
** Independent Multimedia Artist in Pasig **