Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
§
Ìß]j× ã ó — d dl Z dd„ZdS )é NÚ Ú ImmutableFc ó ‡ — t ‰ t ¦ « r(‰ dd¦ « ¦ « Š ˆ fd„}d d„ ‰ D ¦ « ¦ « }d ||rd|z nd |¦ « |¬ ¦ « }|rt
|¦ « d
dlm} t |d¬
¦ « } t ||¦ « n5# t $ r(}t t |¦ « dz |z ¦ « |‚d}~ww xY w|| S )a®
Produces a class that either can be used standalone or as a base class for persistent classes.
This is a thin wrapper around a named tuple.
Constructing a type and using it to instantiate objects:
>>> Point = immutable('x, y', name='Point')
>>> p = Point(1, 2)
>>> p2 = p.set(x=3)
>>> p
Point(x=1, y=2)
>>> p2
Point(x=3, y=2)
Inheriting from a constructed type. In this case no type name needs to be supplied:
>>> class PositivePoint(immutable('x, y')):
... __slots__ = tuple()
... def __new__(cls, x, y):
... if x > 0 and y > 0:
... return super(PositivePoint, cls).__new__(cls, x, y)
... raise Exception('Coordinates must be positive!')
...
>>> p = PositivePoint(1, 2)
>>> p.set(x=3)
PositivePoint(x=3, y=2)
>>> p.set(y=-3)
Traceback (most recent call last):
Exception: Coordinates must be positive!
The persistent class also supports the notion of frozen members. The value of a frozen member
cannot be updated. For example it could be used to implement an ID that should remain the same
over time. A frozen member is denoted by a trailing underscore.
>>> Point = immutable('x, y, id_', name='Point')
>>> p = Point(1, 2, id_=17)
>>> p.set(x=3)
Point(x=3, y=2, id_=17)
>>> p.set(id_=18)
Traceback (most recent call last):
AttributeError: Cannot set frozen members id_
ú,ú c óv •— d„ ‰D ¦ « } | r)d d | ¦ « ¬¦ « S dS )Nc óB — g | ]}| d ¦ « ¯d|z ‘ŒS )Ú_ú'%s')Úendswith)Ú.0Úfs úL/opt/imunify360/venv/lib64/python3.11/site-packages/pyrsistent/_immutable.pyú
z9immutable..frozen_member_test..5 s+ € ÐIÐIÐI¨¸¿ºÀC¹¼ÐI˜& 1™*ÐIÐIÐIó zÆ
frozen_fields = fields_to_modify & set([{frozen_members}])
if frozen_fields:
raise AttributeError('Cannot set frozen members %s' % ', '.join(frozen_fields))
ú, )Úfrozen_membersr )ÚformatÚjoin)r Úmemberss €r Úfrozen_member_testz%immutable..frozen_member_test4 sN ø€ ØIÐI¨gÐIÑIÔIˆØð Að÷ ’ d§i¢i°Ñ&?Ô&?�Ñ@Ô@ð
Að ˆrr r c 3 ó K — | ] }d |z V — Œ
dS )r N© )r
Úms r ú zimmutable..? s&