Skip to content

Combining CleverDict functionality with other classes #5

Description

@PFython

It would be great if CleverDict behaviour could be easily 'grafted on' to existing classes using inheritance, without causing recursion or requiring a rewrite/overwrite of the original class.

For example if it were as easy as:

```
>>> class MyDatetime(datetime.datetime, CleverDict):
...     pass

>>> mdt = MyDatetime.now()
>>> mdt.hour
4
>>> mdt['hour']
4
```

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is neededwontfixThis will not be worked on

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions