Change this sample to use regular Python block
This commit is contained in:
parent
ee73541329
commit
3a17b07d2e
10
README.md
10
README.md
|
@ -366,13 +366,9 @@ AttributeError: 'X' object has no attribute 'y'
|
|||
|
||||
**Note 2**: When class is decorated with `inject` decorator you need to use keyword arguments when instantiating the class manually:
|
||||
|
||||
```pycon
|
||||
>>> x = X(y=2) # that's ok
|
||||
>>> x = X(2) # that'll result in a CallError
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
CallError: Keyword argument y not found
|
||||
|
||||
```python
|
||||
x = X(y=2) # that's ok
|
||||
x = X(2) # this'll raise CallError
|
||||
```
|
||||
|
||||
### Injector
|
||||
|
|
Loading…
Reference in New Issue