Skip to content
This repository has been archived by the owner on Nov 15, 2018. It is now read-only.

Convert cmdpathtypes definitions from dict to immutable structure. #18

Open
luqasz opened this issue Sep 5, 2015 · 0 comments
Open
Assignees

Comments

@luqasz
Copy link
Owner

luqasz commented Sep 5, 2015

Possible solutions:

class CmdPath(namedtuple('CmdPath', ('absolute', 'type', 'keys', 'modord'))):

        def __hash__(self):
            return hash(self.absolute)

http://benno.id.au/blog/2014/11/30/a-better-namedtuple

@luqasz luqasz self-assigned this Sep 5, 2015
@luqasz luqasz changed the title Convert cmdpathtypes definitions from dict to namedtuple Convert cmdpathtypes definitions from dict to immutable structure. Sep 5, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant