Re: @staticmethods called more than once

2013-05-21 Thread 88888 Dihedral
Ethan Furman於 2013年5月22日星期三UTC+8上午12時30分22秒寫道: > On 05/21/2013 08:39 AM, Skip Montanaro wrote: > > > Don't confuse the use of "static" in Python with its use in C/C++. From a > > post on StackOverflow: > > > > > > A staticmethod is a method that knows nothing about the class or > > instan

Re: @staticmethods called more than once

2013-05-21 Thread Christian
Am Dienstag, 21. Mai 2013 18:48:07 UTC+2 schrieb John Gordon: > In John Gordon writes: > > > > > You should only call addHandler() once. > > > > ...for each intended logging output destination, of course. If you want > > logging output to appear in a file and on-screen, then you would cal

Re: @staticmethods called more than once

2013-05-21 Thread Ethan Furman
On 05/21/2013 08:39 AM, Skip Montanaro wrote: Don't confuse the use of "static" in Python with its use in C/C++. From a post on StackOverflow: A staticmethod is a method that knows nothing about the class or instance it was called on. It just gets the arguments that were passed, no im

Re: @staticmethods called more than once

2013-05-21 Thread John Gordon
In John Gordon writes: > You should only call addHandler() once. ...for each intended logging output destination, of course. If you want logging output to appear in a file and on-screen, then you would call addHandler() once with a file handler and once with a screen handler. But I think you

Re: @staticmethods called more than once

2013-05-21 Thread John Gordon
In <02f0123d-2f9e-4287-b983-cfa1db9db...@googlegroups.com> Christian writes: > Hi, > i'm somewhat confused working with @staticmethods. My logger and > configuration methods are called n times, but I have only one call. > n is number of classes which import the loger and configuration class

Re: @staticmethods called more than once

2013-05-21 Thread Skip Montanaro
Don't confuse the use of "static" in Python with its use in C/C++. From a post on StackOverflow: A staticmethod is a method that knows nothing about the class or instance > it was called on. It just gets the arguments that were passed, no implicit > first argument. It is basically useless in Pyth

@staticmethods called more than once

2013-05-21 Thread Christian
Hi, i'm somewhat confused working with @staticmethods. My logger and configuration methods are called n times, but I have only one call. n is number of classes which import the loger and configuration class in the subfolder mymodule. What might be my mistake mistake? Many thanks Christian