Aktuelle Änderungen Printable View Änderungen Bearbeiten
Silverlight > SimonPeythonJones > SimonPeytonJones > SimonPeytonJones > SlickRun > AppLauncher > SmartPointer > SnakesAndRubies > WebApplications > SoftwareArcheology > SoftwareEntwicklung > SoftwareDevelopment > SpielzeugAusBambus > Spyce > Stack > Heap > StatementsAndExpressionsClear TrailStatements contrast with expressions in that the former do not return results and are executed solely for their side effects, while the latter always return a result and often do not have side effects at all.
Ein Ausdruck ist in vielen formalen Sprachen (vor allem in der Programmierung, der Mathematik und der Logik) ein syntaktisches Konstrukt, das gemäß einer gegebenen Semantik in Bezug auf einen Kontext ausgewertet werden kann, also einen Wert liefert. In der Logik spricht man auch von Formeln oder, auf der semantischen Ebene, von Aussagen.[1]
Python draws a firm distinction between expressions and statements. Again, the deep motivation behind this key distinction can be found in several points in the Zen of Python, such as "flat is better than nested" (doing away with the expression/statement separation allows and indeed encourages deep nesting) and "sparse is better than dense" (that 'doing away' would encourage expression/statements with a very high density of operations being performed).[2]