mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
remove get_prefix and set_prefix (#13248)
This commit is contained in:
parent
7c466b4fdc
commit
1a5e5de818
3 changed files with 2 additions and 37 deletions
|
@ -109,26 +109,6 @@ class Base(object):
|
|||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
def set_prefix(self, prefix):
|
||||
"""
|
||||
Set the prefix for the node (see Leaf class).
|
||||
|
||||
DEPRECATED; use the prefix property directly.
|
||||
"""
|
||||
warnings.warn("set_prefix() is deprecated; use the prefix property",
|
||||
DeprecationWarning, stacklevel=2)
|
||||
self.prefix = prefix
|
||||
|
||||
def get_prefix(self):
|
||||
"""
|
||||
Return the prefix for the node (see Leaf class).
|
||||
|
||||
DEPRECATED; use the prefix property directly.
|
||||
"""
|
||||
warnings.warn("get_prefix() is deprecated; use the prefix property",
|
||||
DeprecationWarning, stacklevel=2)
|
||||
return self.prefix
|
||||
|
||||
def replace(self, new):
|
||||
"""Replace this node with a new one in the parent."""
|
||||
assert self.parent is not None, str(self)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue