File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -19,13 +19,15 @@ class Delegator:
1919 >>> delegator.p2
2020 Traceback (most recent call last):
2121 ...
22- AttributeError: 'Delegate' object has no attribute 'p2'
22+ AttributeError: 'Delegate' object has no attribute 'p2'. Did you mean: 'p1'?
2323 >>> delegator.do_something("nothing")
2424 'Doing nothing'
25+ >>> delegator.do_something("something", kw=", faif!")
26+ 'Doing something, faif!'
2527 >>> delegator.do_anything()
2628 Traceback (most recent call last):
2729 ...
28- AttributeError: 'Delegate' object has no attribute 'do_anything'
30+ AttributeError: 'Delegate' object has no attribute 'do_anything'. Did you mean: 'do_something'?
2931 """
3032
3133 def __init__ (self , delegate : Delegate ) -> None :
@@ -47,8 +49,8 @@ class Delegate:
4749 def __init__ (self ) -> None :
4850 self .p1 = 123
4951
50- def do_something (self , something : str ) -> str :
51- return f"Doing { something } "
52+ def do_something (self , something : str , kw = None ) -> str :
53+ return f"Doing { something } { kw or '' } "
5254
5355
5456if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments