deprecated string module issue

Thomas Jollans thomas at jollans.com
Thu Jun 24 13:53:14 EDT 2010


On 06/24/2010 07:39 PM, GrayShark wrote:
> On Jun 24, 10:06 am, GrayShark <howe.ste... at gmail.com> wrote:
>> In my code I have:
>> from string import lower, upper
>>
>> When I use pylint on the program I get just one warning:
>>
>> Uses of a deprecated module 'string'.
>>
>> Iv'e noted that many if not all string functions are now in _builtin_.
>> Where are the constants?
>>
>> Thanks
>> Steven
> 
> Sorry, I meant "from string import lowercase, uppercase"
> 
> As I was joining these two, I just changed the import to 'letters'
> 
> So if the constants are not deprecated, why is the module? Is some
> other
> state then deprecated needed to describe functions and/or methods
> deprecated,
> but not whole modules?

It's not.

http://docs.python.org/library/string.html

"""The string module contains a number of useful constants and classes,
as well as some deprecated legacy functions that are also available as
methods on strings."""

Maybe it's deprecated in pylint-land, but the docs appear to disagree.
And I'd say it's clear whose authority is higher.

Thomas

> 
> It just seems wrong, this all or nothing state.
> 
> Steven




More information about the Python-list mailing list