Skip to content

Commit a1caab1

Browse files
committed
Fix: Some typos in README
1 parent cd12496 commit a1caab1

1 file changed

Lines changed: 13 additions & 6 deletions

File tree

README.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,17 @@ pip install nullsafe
1010

1111
## Quick Start
1212

13+
Dummy Class
14+
15+
```python
16+
class Dummy:
17+
pass
18+
```
19+
1320
Normal Python code
1421

1522
```python
16-
o = object()
23+
o = Dummy()
1724

1825
try:
1926
value = o.inexistent
@@ -27,7 +34,7 @@ With nullsafe:
2734
```python
2835
from nullsafe import undefined, _
2936

30-
o = object()
37+
o = Dummy()
3138

3239
value = _(o).inexistent
3340

@@ -92,7 +99,7 @@ There are various way to get a nullsafe proxied object.
9299
Proxied object doing a possibly `AttributeError` access.
93100

94101
```python
95-
o = SomeClass()
102+
o = Dummy()
96103

97104
# o.inexistent
98105
assert _(o).inexistent is undefined
@@ -114,7 +121,7 @@ assert _(_(o).maybe).inexistent.nested is undefined
114121
Proxied object doing a possibly `KeyError` access.
115122

116123
```python
117-
o = SomeClass() # dict works too !
124+
o = Dummy() # dict works too !
118125

119126
# o.inexistent
120127
assert _(o)["inexistent"] is undefined
@@ -138,7 +145,7 @@ Possibly `None` or `undefined` object doing possibly `AttributeError` or `KeyErr
138145
Note: This only works if the seeking value is accessible, see [limitations](#post-evaluation)
139146

140147
```python
141-
o = SomeClass() # dict works too !
148+
o = Dummy() # dict works too !
142149
o.nay = None
143150

144151
# o.nay?.inexistent
@@ -151,7 +158,7 @@ assert _(o.nay).inexistent.nested is undefined
151158
```
152159

153160
```python
154-
o = SomeClass() # dict works too !
161+
o = Dummy() # dict works too !
155162
o["nay"] = None
156163

157164
# o.nay?.inexistent

0 commit comments

Comments
 (0)