Aug-12-2019, 10:04 AM
(This post was last modified: Aug-12-2019, 10:11 AM by mln4python.)
Can I restrict / limit a variable size in python ?
For example, I want to use an int variable which can hold ONLY upto 6 digit values, i.e., -999999 thru 999999. If I assign some value outside this range, I would like to catch the exception.
Is this possible ?
For example, I want to use an int variable which can hold ONLY upto 6 digit values, i.e., -999999 thru 999999. If I assign some value outside this range, I would like to catch the exception.
Is this possible ?