Re:Advice on learning Python efficiently
by Sean1708 on Thursday December 15, 2016 @12:44PM
(#13186455)
What do you mean by the offside rule in this case? I presume you don't mean that Pyret can't shoot if it got the ball when it was behind all the other language's defenders.
[ Parent
| on HN ]
Re:Advice on learning Python efficiently
by brudgers on Thursday December 15, 2016 @12:54PM
(#13186530)
Only if the Pyret was already in an offside position when the ball was last played by a team mate and it was not a goal kick, throw-in, or corner kick and Pyret was involved in active play (receiving the ball, interfering with a defender, or obstructing the goalkeeper's view)...but I digress.
Python's use of semantic white space in the form of indentation is sometimes referred to as the 'offside rule'.
Re:Advice on learning Python efficiently
by sigzero on Thursday December 15, 2016 @04:20PM
(#13188510)
Interesting, I have never heard that term used in relation to Python white space. TIL
Re:Advice on learning Python efficiently
by brudgers on Thursday December 15, 2016 @05:40PM
(#13189309)
Apparently, the term goes back 50 years. https://en.wikipedia.org/wiki/Off-side_rule