3 ms·
I am amazed that `...` is a valid syntax in Python, not a pseudo grammar. This library is impressive, I appreciate it and I will apply it to my project.
by hitori 3y ago
I am amazed that `...` is a valid syntax in Python, not a pseudo grammar.
This library is impressive, I appreciate it and I will apply it to my project.
- joelthelion 3y agoWhat's the difference between '...' and the more common 'pass'?
- jwestbury 3y agoIn this case, functionally, nothing. Some other commenters have suggested it does something interesting by implying "AI will provide the logic," whereas "pass" doesn't necessarily do that.
- inpaner 3y agoIn code, using ... implies that the code is yet to be written. pass means it's explicitly a noop.
- hoosieree 3y agoI find students correctly infer what to do with "..." whereas they were afraid to touch "pass". E.g, if I gave them this: def foo(x): ... #add your implementation here def bar(x): pass #add your implementation here I'd get back this: def foo(x): return x+1 def bar(x): return x+1 pass