On 9/19/07, Ulrich Holtzhausen <[EMAIL PROTECTED]> wrote:
>
>
>
> I can't seem to figure out how to fix it, also, if there's a shorter way
> of doing this effectively, please help :) .
>
>
>
Instead of a keys in a dict, you should think about making a financeRecord
class to hold the data. Don't worry about methods at first, just use it to
hold your data if nothing else:
class financeRecord:
def __init__(self):
self.hourlyRate= float(raw_input("Hourly rate: "))
self.overtimeMult = float(raw_input("By which sum is your rate multiplied
for overtime hours? "))
#etc
financeLogs = {}
myDetails = None
options = raw_input((menu))
while options != 'quit':
if options == 'details':
myDetails = financeRecord()
else
#whatever else you're doing....
Unless there is some really good reason you need text keys, this is a lot
more natural.
--Michael
--
Michael Langford
Phone: 404-386-0495
Consulting: http://www.TierOneDesign.com/
Entertaining: http://www.ThisIsYourCruiseDirectorSpeaking.com
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor