Hi everyone,

Maybe these questions will sound strange to you, but I sometime have a
hard time switching from Java to Python ;-)

Let's say I have a function like this :

def show_lines(file):
        for next_line in file:
                ...

What can I do to be sure that the input argument is indeed a 'File'
object ?

#1 : should I start by checking that 'file' is indeed an instance of a
File object ? (and how do I do this ?)
#2 : should I do nothing ? (but I don't like the idea of risking to
have a runtime exception raised somewhere)

Thanks for helping...

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to