3 3354
steve morin wrote: http://www.python.org/doc/2.4.1/lib/node110.html
These methods are being deprecated. What are they being replaced with? Does anyone know?
Steve
It might be helpful to compare the following lists.
Python 2.1 (#1, May 23 2003, 11:43:56) [C] on aix4
Type "copyright", "credits" or "license" for more information. import string dir(string)
['_StringType', '__builtins__', '__doc__', '__file__', '__name__',
'_float', '_idmap', '_idmapL', '_int', '_long', 'atof', 'atof_error',
'atoi', 'atoi_error', 'atol', 'atol_error', 'capitalize', 'capwords',
'center', 'count', 'digits', 'expandtabs', 'find', 'hexdigits', 'index',
'index_error', 'join', 'joinfields', 'letters', 'ljust', 'lower',
'lowercase', 'lstrip', 'maketrans', 'octdigits', 'printable',
'punctuation', 'replace', 'rfind', 'rindex', 'rjust', 'rstrip', 'split',
'splitfields', 'strip', 'swapcase', 'translate', 'upper', 'uppercase',
'whitespace', 'zfill'] s = "now" dir(s)
['capitalize', 'center', 'count', 'encode', 'endswith', 'expandtabs',
'find', 'index', 'isalnum', 'isalpha', 'isdigit', 'islower', 'isspace',
'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'replace',
'rfind', 'rindex', 'rjust', 'rstrip', 'split', 'splitlines',
'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper'] for m in dir(string):
.... if m not in dir(s):
.... print m
....
_StringType
__builtins__
__doc__
__file__
__name__
_float
_idmap
_idmapL
_int
_long
atof
atof_error
atoi
atoi_error
atol
atol_error
capwords
digits
hexdigits
index_error
joinfields
letters
lowercase
maketrans
octdigits
printable
punctuation
splitfields
uppercase
whitespace
zfill for m in dir(s):
.... if m not in dir(string):
.... print m
....
encode
endswith
isalnum
isalpha
isdigit
islower
isspace
istitle
isupper
splitlines
startswith
title
steve morin wrote: http://www.python.org/doc/2.4.1/lib/node110.html
These methods are being deprecated. What are they being replaced with? Does anyone know?
Steve
It might be helpful to compare the following lists.
Python 2.1 (#1, May 23 2003, 11:43:56) [C] on aix4
Type "copyright", "credits" or "license" for more information. import string dir(string)
['_StringType', '__builtins__', '__doc__', '__file__', '__name__',
'_float', '_idmap', '_idmapL', '_int', '_long', 'atof', 'atof_error',
'atoi', 'atoi_error', 'atol', 'atol_error', 'capitalize', 'capwords',
'center', 'count', 'digits', 'expandtabs', 'find', 'hexdigits', 'index',
'index_error', 'join', 'joinfields', 'letters', 'ljust', 'lower',
'lowercase', 'lstrip', 'maketrans', 'octdigits', 'printable',
'punctuation', 'replace', 'rfind', 'rindex', 'rjust', 'rstrip', 'split',
'splitfields', 'strip', 'swapcase', 'translate', 'upper', 'uppercase',
'whitespace', 'zfill'] s = "now" dir(s)
['capitalize', 'center', 'count', 'encode', 'endswith', 'expandtabs',
'find', 'index', 'isalnum', 'isalpha', 'isdigit', 'islower', 'isspace',
'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'replace',
'rfind', 'rindex', 'rjust', 'rstrip', 'split', 'splitlines',
'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper'] for m in dir(string):
.... if m not in dir(s):
.... print m
....
_StringType
__builtins__
__doc__
__file__
__name__
_float
_idmap
_idmapL
_int
_long
atof
atof_error
atoi
atoi_error
atol
atol_error
capwords
digits
hexdigits
index_error
joinfields
letters
lowercase
maketrans
octdigits
printable
punctuation
splitfields
uppercase
whitespace
zfill for m in dir(s):
.... if m not in dir(string):
.... print m
....
encode
endswith
isalnum
isalpha
isdigit
islower
isspace
istitle
isupper
splitlines
startswith
title
Sorry, the previous post was based on Python 2.1. That is probably not
of much interest. How about 2.4.1?
Python 2.4.1 (#1, Jul 19 2005, 14:16:43)
[GCC 4.0.0 20050519 (Red Hat 4.0.0-8)] on linux2
Type "help", "copyright", "credits" or "license" for more information. import string dir(string)
['Template', '_TemplateMetaclass', '__builtins__', '__doc__',
'__file__', '__name__', '_float', '_idmap', '_idmapL', '_int', '_long',
'_multimap', '_re', 'ascii_letters', 'ascii_lowercase',
'ascii_uppercase', 'atof', 'atof_error', 'atoi', 'atoi_error', 'atol',
'atol_error', 'capitalize', 'capwords', 'center', 'count', 'digits',
'expandtabs', 'find', 'hexdigits', 'index', 'index_error', 'join',
'joinfields', 'letters', 'ljust', 'lower', 'lowercase', 'lstrip',
'maketrans', 'octdigits', 'printable', 'punctuation', 'replace',
'rfind', 'rindex', 'rjust', 'rsplit', 'rstrip', 'split', 'splitfields',
'strip', 'swapcase', 'translate', 'upper', 'uppercase', 'whitespace',
'zfill'] dir("")
['__add__', '__class__', '__contains__', '__delattr__', '__doc__',
'__eq__', '__ge__', '__getattribute__', '__getitem__', '__getnewargs__',
'__getslice__', '__gt__', '__hash__', '__init__', '__le__', '__len__',
'__lt__', '__mod__', '__mul__', '__ne__', '__new__', '__reduce__',
'__reduce_ex__', '__repr__', '__rmod__', '__rmul__', '__setattr__',
'__str__', 'capitalize', 'center', 'count', 'decode', 'encode',
'endswith', 'expandtabs', 'find', 'index', 'isalnum', 'isalpha',
'isdigit', 'islower', 'isspace', 'istitle', 'isupper', 'join', 'ljust',
'lower', 'lstrip', 'replace', 'rfind', 'rindex', 'rjust', 'rsplit',
'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase',
'title', 'translate', 'upper', 'zfill'] for m in dir(string):
.... if m not in dir(""):
.... print m
....
Template
_TemplateMetaclass
__builtins__
__file__
__name__
_float
_idmap
_idmapL
_int
_long
_multimap
_re
ascii_letters
ascii_lowercase
ascii_uppercase
atof
atof_error
atoi
atoi_error
atol
atol_error
capwords
digits
hexdigits
index_error
joinfields
letters
lowercase
maketrans
octdigits
printable
punctuation
splitfields
uppercase
whitespace for m in dir(""):
.... if m not in dir(string):
.... print m
....
__add__
__class__
__contains__
__delattr__
__eq__
__ge__
__getattribute__
__getitem__
__getnewargs__
__getslice__
__gt__
__hash__
__init__
__le__
__len__
__lt__
__mod__
__mul__
__ne__
__new__
__reduce__
__reduce_ex__
__repr__
__rmod__
__rmul__
__setattr__
__str__
decode
encode
endswith
isalnum
isalpha
isdigit
islower
isspace
istitle
isupper
splitlines
startswith
title This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Carl Youngblood |
last post by:
I imagine this subject has probably been brought up numerous times.
Forgive me for bringing it up again. I was googling through old posts
on this newsgroup about it and found a good suggestion on...
|
by: Mike Tyka |
last post by:
Hello community,
i'm fairly new to using the STL but i've been experimenting a bit with it.
I tried to derive a new class say MyString from string like so:
class MyString: public string{...
|
by: Dan |
last post by:
> http://www.python.org/doc/2.4.1/lib/node110.html
>
> These methods are being deprecated. What are they being replaced
> with?
They're being made methods of the string class itself.
For...
|
by: Paul |
last post by:
hi, there,
for example,
char *mystr="##this is##a examp#le";
I want to replace all the "##" in mystr with "****". How can I do this?
I checked all the string functions in C, but did not...
|
by: Tim Conner |
last post by:
Hi,
Thanks to Peter, Chris and Steven who answered my previous answer about
regex to split a string. Actually, it was as easy as create a regex with the
pattern "/*-+()," and most of my string...
|
by: zoro |
last post by:
Hi,
I am new to C#, coming from Delphi. In Delphi, I am using a 3rd party
string handling library that includes some very useful string
functions, in particular I'm interested in BEFORE (return...
|
by: karthi |
last post by:
hi,
I need user defined function that converts string to float in c.
since the library function atof and strtod occupies large space in
my processor memory I can't use it in my code.
regards,...
|
by: Hitesh |
last post by:
Hi,
In python doc -- 4.1.4 Deprecated string functions -- I read that "The
following list of functions are also defined as methods of string and
Unicode objects; see ``String Methods'' (section...
|
by: =?Utf-8?B?Sm9hY2hpbQ==?= |
last post by:
I have seen the following function to convert from a System::String^ to a
const wchar_t*. I would like to get a LPCTSTR and AFAIK LPCTSTR is equal to
const wchar_t*. Then it should all work right?...
|
by: Cartoper |
last post by:
There is one little static C library to manage the serial number and
unlock key for my application. Today it is compiled with Microsoft
VC6 and linked into both VC6 modules and VS2005 modules. It...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |