How to check if a string is empty in python?

Alex Martelli aleax at mac.com
Thu May 3 00:59:56 EDT 2007


Steven D'Aprano <steve at REMOVEME.cybersource.com.au> wrote:

> On Wed, 02 May 2007 21:19:54 -0400, Roy Smith wrote:
> 
> > for c in s:
> >    raise "it's not empty"
> 
> String exceptions are depreciated and shouldn't be used.
> 
> http://docs.python.org/api/node16.html

They're actually deprecated, not depreciated.

Searching define:deprecated -- first hit:

In computer software standards and documentation, deprecation is the
gradual phasing-out of a software or programming language feature. 
en.wikipedia.org/wiki/Deprecated

and the other four hits are fine too.

Searching define:depreciated , we move almost entirely into accounting
and finance, except:

http://en.wikipedia.org/wiki/Depreciated
"""
Depreciated is often confused or used as a stand-in for "deprecated";
see deprecation for the use of depreciation in computer software
"""


Alex



More information about the Python-list mailing list