(Replying to PARENT post)
Why do you have the fixed length requirement?
Regular lists seem to work perfectly for this
๐คcdancette๐7y๐ผ0๐จ๏ธ0
(Replying to PARENT post)
The length of a list is fixed if you don't use any operation that changes the length of the list. :)
๐คomaranto๐7y๐ผ0๐จ๏ธ0
(Replying to PARENT post)
A deque can have a fixed length, and its elements are mutable.
https://docs.python.org/3.6/library/collections.html#collect...
๐คJoBrad๐7y๐ผ0๐จ๏ธ0
(Replying to PARENT post)
NamedTuple has a _replace method (that you probably shouldn't be using) that you could use to build something like that if you really need it.
๐คdagw๐7y๐ผ0๐จ๏ธ0
(Replying to PARENT post)
Its not in the language, but a numpy array will do the job.
๐คsrean๐7y๐ผ0๐จ๏ธ0
(Replying to PARENT post)
What scenarios would it be useful for?
๐คcollyw๐7y๐ผ0๐จ๏ธ0
(Replying to PARENT post)
my_fixed_array = [None] * 10
๐คjastr๐7y๐ผ0๐จ๏ธ0
(Replying to PARENT post)