Reloading modules

Delaney, Timothy tdelaney at avaya.com
Thu Feb 21 17:58:38 EST 2002


> From: Oleg Broytmann [mailto:phd at phd.pp.ru]
> 
> On Thu, Feb 21, 2002 at 12:02:08PM +0000, Michael Hudson wrote:
> >     if file.endswith("c"):
> >         file = file[:-1]
> 
> if file.endswith("c"):
>    file = file[:-1]
> elif file.endswith("o"):
>    file = file[:-1]

if file[-1:] in ('c', 'o',):
    file = file[:-1]

Tim Delaney




More information about the Python-list mailing list