I have a Sleep
class (object) and within that class a sleepInSeconds()
method.
Is there any difference between doing this:
wait = Sleep()
wait.sleepInSeconds(10)
And doing this:
wait = Sleep().sleepInSeconds(10)
or
Sleep().sleepInSeconds(10)
Which is more correct (or 'Pythonic'), what kinds of problems could I run into with one or the other? Is there some overarching principal from OO programming that should have led me to this answer?