blaze / blaze/odo

subclasses

Open
#321 0 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
Python
Stars
1k
Forks
131
PR merge metrics
No merged PRs in 30d

Description

Does it make sense to allow subclasses to be used as sources. For example

``` python
class C:
def m(self):
return [1, 2, 3]

class D(C):
def m(self):
return super() + [4, 5, 6]

@convert.register(list, C)
def _(n, **kwargs):
return n.m()

odo(D(), list)
```

Currently, this gives `KeyError: `; however, as long as you have a well formed subclass, I think this could be resolved

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.