Deactivate code in python without changing indentation or adding comments -


i suspect answer question big no! here goes.

is there way deactivate (temporarily) long code snippets without having comment every line or putting if false: , indenting every line?

as example, have code

for in range(1,largenumber):     dosuff(a)     ###do mode stuff     ###....     done(a) 

however, since i'm still developing code don't want lengthy loop run. options far i'm aware:

comment away

#for in range(1,largenumber):     #dosuff(a)     ####do mode stuff     ####....     #done(a) 

or wrap in false if-statement

if false:     in range(1,largenumber):         dosuff(a)         ###do mode stuff         ###....         done(a) 

both of require me manipulate every line want deactivate.

is there more clever way of doing without having change indentation or adding comments @ every line. (except maybe putting largenumber=0 here.)

as requested, proposed :

to comment large code :

""" in range(1,largenumber):         dosuff(a)         mode stuff         ....         done(a) """ 

everything in between 2 """ commented. tobias_k said, doesn't work if have multi-line strings in code.

but, said, can make work :

""" print 'anything sinple quotes instead of double quotes' """ 

Comments