Did I find the right examples for you? yes no

All Samples(8)  |  Call(0)  |  Derive(0)  |  Import(8)
Decorator for methods that are allowed to modify immutable objects

        def mutating_method(func):
    """Decorator for methods that are allowed to modify immutable objects"""
    def wrapper(self, *__args, **__kwargs):
        old_mutable = self._mutable
        self._mutable = True
        try:
            # Call the wrapped function
            return func(self, *__args, **__kwargs)
        finally:
            self._mutable = old_mutable
    return wrapper
        


src/p/y/python-phonenumbers-HEAD/python/phonenumbers/phonemetadata.py   python-phonenumbers(Download)
# See the License for the specific language governing permissions and
# limitations under the License.
from .util import UnicodeMixin, ImmutableMixin, mutating_method
from .util import u, unicod, rpr, force_unicode
 

src/p/h/phonenumbers-6.0.0a/phonenumbers/phonemetadata.py   phonenumbers(Download)
# See the License for the specific language governing permissions and
# limitations under the License.
from .util import UnicodeMixin, ImmutableMixin, mutating_method
from .util import u, unicod, rpr, force_unicode
 

src/p/y/python-phonenumbers-HEAD/python/phonenumbers/phonenumber.py   python-phonenumbers(Download)
# See the License for the specific language governing permissions and
# limitations under the License.
from .util import UnicodeMixin, ImmutableMixin, mutating_method
from .util import to_long, unicod, rpr, force_unicode
 

src/p/h/phonenumbers-6.0.0a/phonenumbers/phonenumber.py   phonenumbers(Download)
# See the License for the specific language governing permissions and
# limitations under the License.
from .util import UnicodeMixin, ImmutableMixin, mutating_method
from .util import to_long, unicod, rpr, force_unicode
 

src/p/h/phonenumberslite-6.0.0a/phonenumbers/phonemetadata.py   phonenumberslite(Download)
# See the License for the specific language governing permissions and
# limitations under the License.
from .util import UnicodeMixin, ImmutableMixin, mutating_method
from .util import u, unicod, rpr, force_unicode
 

src/p/h/phonenumberslite-6.0.0a/phonenumbers/phonenumber.py   phonenumberslite(Download)
# See the License for the specific language governing permissions and
# limitations under the License.
from .util import UnicodeMixin, ImmutableMixin, mutating_method
from .util import to_long, unicod, rpr, force_unicode
 

src/p/h/PhoneNumbers-HEAD/Python/phonenumbers/phonemetadata.py   PhoneNumbers(Download)
# See the License for the specific language governing permissions and
# limitations under the License.
from .util import UnicodeMixin, ImmutableMixin, mutating_method
 
REGION_CODE_FOR_NON_GEO_ENTITY = u"001"

src/p/h/PhoneNumbers-HEAD/Python/phonenumbers/phonenumber.py   PhoneNumbers(Download)
# See the License for the specific language governing permissions and
# limitations under the License.
from .util import UnicodeMixin, ImmutableMixin, mutating_method