8. De viktigaste punkterna
Beautiful is better than ugly.
Simple is better than complex.
Readability counts.
If the implementation is hard to explain, it's a bad idea.
10. PEP 8 är en style-guide för att skriva
Python-kod
11. Det viktigaste med PEP 8
Kod läses många fler gånger än den skrivs
Samstämmighet för de som skriver/läser kod
12. Undantag mot PEP 8? När?
Lyssna på omgivningen (kanske ert företag har andra designregler för kod?)
Minskar läsbarheten
13. De viktigaste punkterna!
4st mellanslag (alt. TAB)
Mixa aldrig tabbar och mellanslag
Ha maximalt 79 tecken per rad, annarsradbryt
Använd blanka rader med måtta
28. Proceduralprogrammingis a method of writing
software. It is a programming practice centered on the
procedures or actions that take place in a program
29.
30. Procedural programming is made up of
one or more procedures
Procedures operate on data items that are separate from the procedure
Data items are passed from one procedure to another
Focus is on the creation of procedures that operate on the program’s data
31. Object-oriented programming is centered on
objects. Objects are created from abstract
data types that encapsulate data and function
together.
32. OOP
An object is a software entry that contains both data and procedures
Data contained in an object is known as the object’s data attributes
Procedures that an object performs are known as methods
33.
34. A class is code that specifies data
attributes and methods for a particular
type of data.