Object oriented programming in python презентация
Содержание
- 2. Agenda Introduction Objects, Types and Classes Class Definition Class
- 3. Introduction. It’s all objects… Everything in Python is really an object.
- 4. Objects, names and references All values are objects A variable is
- 5. Class Definition For clarity, in the following discussion we consider
- 6. Class Definition In the terminology of the Python members of the
- 7. Class Definition In Python a class is not something static after
- 8. Class Instantiation To instantiate a class, that is, create an instance
- 9. Class Instantiation By overriding the class method __new__, you can control
- 10. Class Instantiation The following code demonstrates one of the options for
- 11. Constructor and Destructor Special methods are invoked at instantiation of
- 12. Lifetime of an object Without using any special means lifetime of
- 13. Encapsulation and access to properties Encapsulation is one of the key
- 14. Encapsulation and access to properties There is a significant difference between
- 15. Encapsulation and access to properties Access to the attribute can be
- 16. Encapsulation and access to properties …Or using the properties with the
- 17. Encapsulation and access to properties There are two ways to centrally
- 18. Polymorphism In the compiled programming languages, polymorphism is achieved by creating
- 19. Polymorphism Explicitly specifying the name of the class, you can call
- 20. Polymorphism: Virtual Methods Using a special provided exception NotImplementedError, you can
- 21. Polymorphism: Virtual Methods Or, using a python decorator:
- 22. Polymorphism Changing attribute __class__, you can move an object up or
- 23. Inheritance and Multiple Inheritance Python supports both single inheritance and multiple,
- 24. "New" and "Classic" Classes In versions prior to 2.2, some object-oriented
- 25. Settlement of access to methods and fields Behind a quite easy
- 26. Aggregation. Containers. Iterators Aggregation, when one object is part of
- 27. Aggregation. Containers. Iterators Here's how it works:
- 28. Metaclasses I’s not always enough to have ordinary capabilities of object-oriented
- 29. Metaclasses
- 30. Methods Syntax of a method has no difference from the description
- 31. Static Methods
- 32. Class Methods
- 33. Multimethods (Multiple Dispatch)
- 34. Object Persistence
- 35. References http://docs.python.org/tutorial/classes.html Объектно-ориентированное программирование на Питоне OOP in Python after 2.2
- 36. Questions?
- 37. Скачать презентацию
Слайды и текст этой презентации
Скачать презентацию на тему Object oriented programming in python можно ниже: