Re:Show HN: Magentic – Use LLMs as simple Python functions
by joelthelion on Wednesday September 27, 2023 @04:38AM
(#37671829)
What's the difference between '...' and the more common 'pass'?
[ Parent
| on HN ]
Re:Show HN: Magentic – Use LLMs as simple Python functions
by jwestbury on Wednesday September 27, 2023 @06:12AM
(#37672628)
In 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.
Re:Show HN: Magentic – Use LLMs as simple Python functions
by inpaner on Wednesday September 27, 2023 @06:47AM
(#37672842)
In code, using ... implies that the code is yet to be written. pass means it's explicitly a noop.
Re:Show HN: Magentic – Use LLMs as simple Python functions
by hoosieree on Wednesday September 27, 2023 @07:35AM
(#37673184)
I 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