Reloading modules

Delaney, Timothy tdelaney at avaya.com
Thu Feb 21 23:58:38 CET 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