[Tutor] text processing lines variable content

Alan Gauld alan.gauld at yahoo.co.uk
Thu Feb 7 04:40:59 EST 2019


On 07/02/2019 08:58, ingo janssen wrote:

>        try:
>          lbl = f_label(label)
>        except NameError as e:
>           lbl = f_number(label)
>           label=[lbl]

Just a minor point but since you aren't doing
anything with the error you don't need the
'as e' bit at the end of each line...

Just saves a little typing is all.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list