We don't bite newbies here... much | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I'm not sure why rtoa has to be in the closure.
you can mimic your semantic in Python by using a generator function acting as closure, defining a nested function roman_to_dec and returning it. I don't have Python installed and am not a Py expert, so please accept my semantically equal Perl interpolation. (untested)
NB: This will look much easier in Python because it's automatically dereferencing. UPDATEI suppose most Pythonistas would rather prefer making rtoa a class variable and using roman_to_dec as a method. TIMTOWTDI. ;-)
Cheers Rolf In reply to Re^6: A short whishlist of Perl5 improvements leaping to Perl7
by LanX
|
|