4 ms·
- Languages should only make special syntax for very common or very important needs. Neither applies here. - It violates the longstanding Python rule that assi
by neolog 6y ago
- Languages should only make special syntax for very common or very important needs. Neither applies here.
- It violates the longstanding Python rule that assignments don't escape the enclosing scope.
- smetj 6y ago> It violates the longstanding Python rule that assignments don't escape the enclosing scope. But doesn't that violate the longstanding Python rule that A Foolish Consistency is the Hobgoblin of Little Minds ?
- neolog 6y agoNo. Assignment leaking into enclosing scope is a bad idea.
- beforeolives 6y agoThe trick is tell when striving for consistensy is foolish and when it isn't. Otherwise you would always be able to fall back on this quote to justify creating unuseable code/frameworks/projects/languages.
- bobbylarrybobby 6y agoDon’t assignments already escape scope? if True: x = 1 print(x)
- neolog 6y ago`if` blocks don't make a scope. Comprehensions do.