on

Cerca

Heus ací els resultats de la cerca.

2.4 Decorators
256 Resultats, Darrera modificació:
= 2.4 Decorators A decorator is one of the design patterns that describes the structure of related objects. Python is able to decorate functions, methods, and classes. The decorator's operation is based on wrapping the original function with a
3.1 Advanced techniques of creating and serving exceptions
235 Resultats, Darrera modificació:
dvanced techniques of creating and serving exceptions In this module, we'll talk about Python exceptions – objects that represent errors which occur during the execution of a program that disrupts the normal flow of the
2.1 Python core syntax
196 Resultats, Darrera modificació:
= 2.1 Python core syntax So far we have been using Python core operations that allow us to operate on strings, lists, integers, and floats. It’s natural for us to formulate e
5.1 Metaprogramming
170 Resultats, Darrera modificació:
= 5.1 Metaprogramming == Introduction to metaclasses Metaprogramming is a programming technique in whi... es. It may sound like an idea from a science fiction story, but the idea was born and implemented in the early 1960s. For Python, code modifications can occure while the code is being executed, and you might have already experienc
2.9 Inheriting properties from built-in classes
142 Resultats, Darrera modificació:
9 Inheriting properties from built-in classes Python gives you the ability to create a class that inherits properties from any Python built-in class in order to get a new class that c... has the advantage of all of the well-known functionalities inherited from its parent or even parents ... ride the methods by delivering your own modifications for the selected methods. In the following exam
4.1 Shallow and deep copy operations
130 Resultats, Darrera modificació:
= 4.1 Shallow and deep copy operations == Copying objects using shallow and deep operations In this module, you’ll learn how to copy Python objects. Specifically, you'll learn about: * obje... label vs. identity vs. value; * the id() function and the is operand; * shallow and deep copies o
2.6 Abstract classes
122 Resultats, Darrera modificació:
= 2.6 Abstract classes Python is considered to be a very flexible programming language, but that doesn’t mean that there are no controls to impose a set of functionalities or an order in a class hierarchy. When you develop a system i
2.8 Composition vs Inheritance - two ways to the same destination
120 Resultats, Darrera modificació:
= 2.8 Composition vs Inheritance - two ways to the same destination So far we've been using and following the inheritance concept when modeling our classes to represent real-life issues. Inheritance is a great concept, one of the most important foundations of obj
4.2 Serialization of Python objects using the pickle module
109 Resultats, Darrera modificació:
= 4.2 Serialization of Python objects using the pickle module In this section, you will learn how to persist Python objects for later use. **Pickling** is the process of preservi
2.2 Inheritance and polymorphism — Inheritance as a pillar of OOP
108 Resultats, Darrera modificació:
m — Inheritance as a pillar of OOP Inheritance is one of the fundamental concepts of object oriented programming, and expresses the fundamental relationships between classes: superclasses (parents) and ... cialized (or more specific) than its superclass. Conversely, each superclass is more general (more abs
1.2 Working with class and instance data – instance variables
99 Resultats, Darrera modificació:
e variables This kind of variable exists when and only when it is explicitly created and added to an object. This can be done during the object's initialization, performed by the __init__ method, or later at any moment of the ... h object carries its own set of variables – they don't interfere with one another in any way. The word
1.1 Classes, Instances, Attributes, Methods — introduction
96 Resultats, Darrera modificació:
asses, Instances, Attributes, Methods — introduction == Introduction to Object-Oriented Programming This module addresses the advanced Object Oriented Pro... ramming (OOP) issues that are at the heart of Python programming. The object-oriented approach is an evolution of good design practices that go back to the very
2.7 Encapsulation
96 Resultats, Darrera modificació:
= 2.7 Encapsulation == Attribute encapsulation Encapsulation is one of the fundamental concepts in object-oriented programming (amongst inheritance, polymorphism,
2.3 Extended function argument syntax
77 Resultats, Darrera modificació:
= 2.3 Extended function argument syntax When we talk about function arguments, we should recall the following facts: * some functions can be invoked without arguments; * functions may require a specific number of arguments with no e
2.5 Different faces of Python methods
63 Resultats, Darrera modificació:
= 2.5 Different faces of Python methods Until now, we’ve been implementing methods that have performed operations on the instances (objects), and in particular the attributes of the instance, so we’ve called them i... ve previously existed. The code in the editor demonstrates the idea presented above. <code python> c
4.3 Making Python objects persistent using the shelve module
37 Resultats, Darrera modificació: