Uhh...<br clear="all"><div class="gmail_quote"><br></div><div class="gmail_quote">On Fri, Jun 25, 2010 at 2:31 PM, GrayShark <span dir="ltr"><<a href="mailto:howe.steven@gmail.com">howe.steven@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">As to your comment about Logilab's pylint. I'v seen a ticket similar to<br>
this from three months back. I assume they're not fixing it because if<br>
you review 'string' via pydoc you'd read this:<br>
<br>
---------------------------------------<br>
Help on module string:<br>
<br>
NAME<br>
string - A collection of string operations (most are no longer used).<br>
<br>
FILE<br>
/usr/lib64/python2.6/string.py<br>
<br>
DESCRIPTION<br>
Warning: most of the code you see here isn't normally used nowadays.<br>
Beginning with Python 1.6, many of these functions are implemented as<br>
methods on the standard string object. They used to be implemented by<br>
a built-in module called strop, but strop is now obsolete itself.<br></blockquote><div><br></div><div>What is this supposed to demonstrate? That is perfectly accurate. It says, _most_of_the_code_ here isn't used. The functions, as we have said, are deprecated-- as they have been moved to the string objects directly.</div>
<div><br></div><div>The module has *not* been deprecated. Nothing in that quote even *implies* deprecation of the module, the constants, nor any of the code which is there that *hasn't* been deprecated -- namely, formatter instances and related functions these days.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Not the 1.6. Seems some serious work went into putting the 'string's<br>
functionality into _builtin_.<br></blockquote><div><br></div><div>No, the string functions were moved to methods of the string type.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I've seen many 'deprecated' warnings when programming in PyGTK, as<br>
modules get replaced or functionality changes. I've always assumed it<br>
means that the module will be removed at some future date. An advisory to<br>
programmers and users.<br></blockquote><div> </div><div>Yes, that is precisely what that means. And as we have said repeatedly: many of the *functions* previously contained in the string module were deprecated. </div><div>
<br></div><div>The string module was not.</div><div><br></div><div>The functions were slated for removal. They were prominently documented as such so when the removal happened (years later), people were prepared.</div><div>
<br></div><div>/The string module itself, its constants, and other code that was NOT moved into string methods, was *never* deprecated/. </div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
You might note what 'deprecated' means. <a href="http://www.thefreedictionary.com/" target="_blank">http://www.thefreedictionary.com/</a><br>
deprecated<br>
tr.v. de·pre·cat·ed, de·pre·cat·ing, de·pre·cates<br>
1. To express disapproval of; deplore.<br>
2. To belittle; depreciate.<br>
3. Computer Science To mark (a component of a software standard) as<br>
obsolete to warn against its use in the future so that it may be phased<br>
out.<br>
-----------------------------------------------<br>
<br>
Not the third definition. It applies here. I was inquiring about what<br>
other module I should be using instead, having grep'ped my way through<br>
/usr/lib64/python2.6/*.py<br></blockquote><div><br></div><div>... We all know.</div><div><br></div><div>I know. Terry knows. Guido knows. Logilab knows, they just appear to be a little bit confused about what is and isn't deprecated in this case.</div>
<div><br></div><div>Again: many of the functions in the string module were deprecated. Only those specific functions. The rest was not</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
for a replacement.<br></blockquote><div><br></div><div>You should continue to use the string module, as it is not deprecated. There is no replacement. The string module will be there forever. And probably grow too, a little bit.</div>
<div><br></div><div>If you are using any of the functions that used to be in that module, but are now methods on the string class directly, you should use those on the string objects instead. The "join" method which used to be in that module is now a method on sequence types.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Nor a naive user here. Been programming/using python since 2000</blockquote><div><br></div><div>Then I really don't understand the difficulty here in understanding the difference between a deprecated module, and a module that contains a number of deprecated things (and some not deprecated too)</div>
<div><br></div><div>Seriously, go look at -- <a href="http://docs.python.org/library/string.html">http://docs.python.org/library/string.html</a></div><div><br></div><div>Scroll 2/3rds of the way down to 7.1.6.</div><div>
<br>
</div><div>Everything below that line is deprecated. Its all gone in Python 3.</div><div><br></div><div>Everything above that line is *not* deprecated. It's sticking around.</div><div> </div><div>--S</div></div>