Comments (2)
Hi @qpwo
Thanks for reporting the issue.
I started looking into it a few days ago and a fix for it should be available very soon.
//Daniel
from dataclass-csv.
Replicated
from dataclasses import dataclass
from io import StringIO
from dataclass_csv import DataclassReader
class C:
def __init__(self, x):
print(f"initialized with {x!r}")
self.x = x
@dataclass
class Row:
b: int
c: C = C(5)
# initialized with 5
A = list(DataclassReader(StringIO("b,c\n1,"), Row))
# initialized with <__main__.C object at 0x10385ea90>
print(A[0].c.x)
# <__main__.C at 0x10385ea90>
from dataclass-csv.
Related Issues (20)
- DataclassWriter HOT 3
- Support frozen dataclasses HOT 1
- Populate dataclass fields in their order with row data HOT 2
- Support 'Path' columns HOT 2
- TypeError: 'module' object is not callable referring to "field_type(value)" HOT 1
- Feature Request: Support custom field types HOT 1
- Override constructor with transformation function HOT 15
- Report mapping non-existant column HOT 2
- Automatically generate candidate dataclass HOT 4
- AttributeError: 'str' object has no attribute '__dict__' HOT 7
- Type annotations for *args and **kwds HOT 2
- Allow NULL values more conveniently, and fix README TypeError: non-default argument 'age' follows default argument HOT 2
- Dateformat decorator does not apply to DataclassWriter HOT 4
- DeprecationWarning for distutils package HOT 4
- Cannot read a nested dataclass HOT 2
- Support to split object properties to separate columns.
- Type checker doesn't recognize the type of the dataclasses returned by DataclassReader
- Support for Enum type HOT 2
- Empty string throws exception HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dataclass-csv.