Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Uncategorized category for The Warlords by _Chico_
# ----------------------
# NOTE: Descriptors are at the class level, so all instances of a class use the same descriptor instance!
class RangedInt(object):
"""Descriptor: Integer with max and/or min limit cutoff.
Allows for changing min/max values in object's instance, as a range between [min] and [max]
Setting min/max in class def will lock min/max value for the attribute.
Value of None for max/min means no limit imposed, then just an int.
if not locked, may set/change range by setting in instance,
instance attributes '
May 17, 2021