[Python-Dev] Re: Proposal for a modified import mechanism. (original) (raw)
Michael McLay mclay@erols.com
Sun, 11 Nov 2001 10:45:35 -0500
- Previous message: [Python-Dev] New class/type features (Replacing __slots__ with addmembers())
- Next message: [Python-Dev] PEP 275: "Switching on Multiple Values", Rev 1.1
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
mal> will have to be a read-only type (e.g. a read-only mal> dictionary). SM>There was discussion once upon a time about adding a read-write flag to SM>dictionaries to prevent modification during sensitive times. I gather SM> lists already have such a flag to allow in-place sorting to work.
The member description returned by addmembers() allows types to be specified for an attribute. It would be trivial to add another flag to mark the member as read only. You could also add methods to the PyExtendedMemberDescrObject to allow the state to be turned on at the begining of the switch and off at the end of the switch.
- Previous message: [Python-Dev] New class/type features (Replacing __slots__ with addmembers())
- Next message: [Python-Dev] PEP 275: "Switching on Multiple Values", Rev 1.1
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]