<div class="gmail_quote">On 14 December 2011 17:06, Jean-Michel Pichavant <span dir="ltr"><<a href="mailto:jeanmichel@sequans.com">jeanmichel@sequans.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Joshua Landau wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
[snip]<br>
Using currentLogger is just padding, in my opinion. *Every *value is "current<value>".<br>
</blockquote>
Not always. I try to keep names on the same object because that object is supposed to be named that way.<br>
I can change one of the object attribute, but the object named that way keep being the same.<br>
<br>
Class Foo:<br>
self.__init__(self):<br>
self.banana = 5<br>
<br>
myFoo = Foo()<br>
<br>
Now there's a slight difference between<br>
<br>
myFoo = Exception()<br>
and<br>
myFoo.banana = 4<br>
<br>
The first statement rebind myFoo to something complitely different.<br>
the second statement change one of the object rightfully named myFoo .. attribute (not sure about this construct :D )<br>
<br>
Int being inmutable, you can rebind a name without changing its meaning.<br></blockquote><div><br></div><div>type(myFoo) before != type(myFoo) after</div><div>type(myFoo.bannana) before == type(myFoo.bannana) after</div>
<div>type(logger) before == type(logger) after</div><div><br></div><div>You are changing the int to a new value, but it's OK for you - if I understand rightly - because it's not changing its "meaning". The "meaning" of logger is the same too, as it does the same thing, in approximately the same way. I agree that "logger = Exception()" would be vary bad in that sense, too. The point is you use it the same way and it's not going to cause problems from misunderstanding what the object type is. And because "logger = childLogger('this_function')" is explicit and hopefully at the top 'o the function, any conceivable errors should be pretty obvious.</div>
<div><br></div><div>Note that I used quotation marks around "meaning" not to mock the use or whatnot, but because I was trying to show that I was trying to use the same version of the word you did. I don't know if that was clear from the passage itself.</div>
<div><br></div><div>That said, you did keep the myFoo the same, even with the int change. That makes the change global to all myFoo instances. But I didn't get that as a main point from your argument, and if it was I fear we're too close to recursive arguments.</div>
<div><br></div><div><br></div><div>And in regards to your own commentary on your English, I wouldn't like you to see it as trouble. I'm currently thoroughly enjoying the debate, and wouldn't like to see myself scaring you off...</div>
</div>