x=something, y=somethinelse and z=crud all likely to fail - how do i wrap them up

Vincent Davis vincent at vincentdavis.net
Mon Feb 1 13:40:26 EST 2016


On Sat, Jan 30, 2016 at 9:58 PM, Veek. M <vek.m1234 at gmail.com> wrote:

> Is there some other nice way to wrap this stuff up?
> I can't do:
> try:
>  x=
>  y=
>  z=
> except:
>

I happend to


Have just been doing the something
similar. You can put x,y,x in a list and loop over it. In my case a dict
was better.
See the example here.
https://github.com/vincentdavis/USAC_data/blob/master/tools.py#L24

Vincent Davis
720-301-3003



More information about the Python-list mailing list