Cerca

Heus ací els resultats de la cerca.

5.1 Metaprogramming @info:cursos:pue:python-pcpp1:m1
257 Resultats, Darrera modificació:
= 5.1 Metaprogramming == Introduction to metaclasses Metaprogramming is a programming technique in whi... Another example of metaprogramming is the **metaclass** concept, which is one of the most advanced co... en of Python**, expressed his feelings about metaclasses in the **comp.lang.python** newsgroup on 12/22/2002: //[metaclasses] are deeper magic than 99% o
2.2 Inheritance and polymorphism — Inheritance as a pillar of OOP @info:cursos:pue:python-pcpp1:m1
153 Resultats, Darrera modificació:
nheritance and polymorphism — Inheritance as a pillar of OOP Inheritance is one of the fundamental con... nted programming, and expresses the fundamental relationships between classes: superclasses (parents) and their subclasses (descendants). Inheritance creates a class hierarchy
1.2 Working with class and instance data – instance variables @info:cursos:pue:python-pcpp1:m1
113 Resultats, Darrera modificació:
= 1.2 Working with class and instance data – instance variables == Instance variables This kind of var... tialization, performed by the __init__ method, or later at any moment of the object's life. Furthermor... are closely connected to the objects (which are class instances), not to the classes themselves. To get access to the instance variable, you should addre
2.6 Abstract classes @info:cursos:pue:python-pcpp1:m1
106 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 co... impose a set of functionalities or an order in a class hierarchy. When you develop a system in a group... have some means of establishing requirements for classes in matters of interfaces (methods) exposed by
2.4 Decorators @info:cursos:pue:python-pcpp1:m1
92 Resultats, Darrera modificació:
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 wrapp... al function with a new "decorating" function (or class), hence the name "decoration". This is done by ... ng function returns a function that can be called later. Of course, the **decorating** function does
1.1 Classes, Instances, Attributes, Methods — introduction @info:cursos:pue:python-pcpp1:m1
86 Resultats, Darrera modificació:
= 1.1 Classes, Instances, Attributes, Methods — introduction == Introduction to Object-Oriented Progra... with OOP, and even the mouse cursor image is displayed using an application created with OOP. The sam... should agree on the following definitions: * class — an idea, blueprint, or recipe for an instance; * instance — an instantiation of the class; very often used interchangeably with the term
2.5 Different faces of Python methods @info:cursos:pue:python-pcpp1:m1
82 Resultats, Darrera modificació:
rations on the instances (objects), and in particular the attributes of the instance, so we’ve called ... strates the idea presented above. <code python> class Example: def __init__(self, value): ... le2.get_internal()) </code> Each of the Example class objects has its own copy of the instance variab... <code ; output> 10 99 </code> == The static and class methods Two other types of method can also be u
2.8 Composition vs Inheritance - two ways to the same destination @info:cursos:pue:python-pcpp1:m1
80 Resultats, Darrera modificació:
lowing the inheritance concept when modeling our classes to represent real-life issues. Inheritance is... object-oriented programming that models a tight relation between two classes: the base class and the derived class, called a subclass. The result of this relation is a subcl
4.1 PEP 257 – Docstring Conventions @info:cursos:pue:python-pcpp1:m2
72 Resultats, Darrera modificació:
conventions**, best practices, and semantics (not laws or regulations!) associated with documenting Python code using docstrings. In short, it tries to an... rs as the first statement in a module, function, class, or method definition. Such a docstring becomes... n **documentation strings** that are used in the class, module, function, and method definition in ord
2.7 Encapsulation @info:cursos:pue:python-pcpp1:m1
69 Resultats, Darrera modificació:
= 2.7 Encapsulation == Attribute encapsulation Encapsulation is one of the fundamental concepts in object-oriented programming (amongst inherita... d methods that work on those attributes within a class. Encapsulation is used to hide the **attribute
3.1 PEP 8 – Introduction @info:cursos:pue:python-pcpp1:m2
57 Resultats, Darrera modificació:
* Documentation: https://pycodestyle.pycqa.org/en/latest/ * You can also install **autopep8** to aut... ble to use it, you need the //pycodestyle// installation on your machine in order to indicate those pa... style guidelines. The online tool is built using Flask, Twitter Bootstrap, and the PEP8 module (the ve... pep8online.com/about == Recommendations for Code Layout PEP 8 is supposed to make your coding experie
2.1 PEP 20 – The Zen of Python @info:cursos:pue:python-pcpp1:m2
56 Resultats, Darrera modificació:
time major contributor to the Python programming language and Python community, wrote this 19-line po... aximum line length, variable naming conventions, placing statements on separate lines, and many others. Example: Write a program that calculates the hypotenuse of a right-angled triangle. {{... enever you want to use an implicit feature of the language, ask yourself whether you really need it. M
2.1 Python core syntax @info:cursos:pue:python-pcpp1:m1
53 Resultats, Darrera modificació:
integers, and floats. It’s natural for us to formulate expressions using algebraic symbols representin... different** data types, when operations are formulated using **the same** operators or instructions, ... str(), len() * reflexion – isinstance(), issubclass() and a few more elements. Python allows us t... agine the following situation: you've created a class that represents a person; each instance of the
2.3 A small lexicon of widgets - Part 3 @info:cursos:pue:python-pcpp1:m3
53 Resultats, Darrera modificació:
racer remembers its **previous** state (using the last_s variable) and restores the field to this stat... kinter as tk def digits_only(*args): global last_string string = text.get() if string ==... g.isdigit(): # Field's content is valid. last_string = string else: text.set(last_string) last_string = '' window = tk.Tk() text =
2.9 Inheriting properties from built-in classes @info:cursos:pue:python-pcpp1:m1
52 Resultats, Darrera modificació:
= 2.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 can enrich the parent's attributes or methods. As a result, your n
1.6 Events and how to handle them @info:cursos:pue:python-pcpp1:m3
46 Resultats, Darrera modificació:
1.5 A simple GUI application @info:cursos:pue:python-pcpp1:m3
44 Resultats, Darrera modificació:
1.1 SQLite @info:cursos:pue:python-pcpp1:m5
41 Resultats, Darrera modificació:
4.1 Shallow and deep copy operations @info:cursos:pue:python-pcpp1:m1
37 Resultats, Darrera modificació:
1.7 Visiting widgets’ properties @info:cursos:pue:python-pcpp1:m3
31 Resultats, Darrera modificació:
1.3 JSON – our new friend @info:cursos:pue:python-pcpp1:m4
27 Resultats, Darrera modificació:
1.4 Talking to JSON in Python @info:cursos:pue:python-pcpp1:m4
27 Resultats, Darrera modificació:
1.2 How to use sockets in Python @info:cursos:pue:python-pcpp1:m4
26 Resultats, Darrera modificació:
1.2 Let TkInter speak! @info:cursos:pue:python-pcpp1:m3
23 Resultats, Darrera modificació:
1.7 Four magic letters: CRUD @info:cursos:pue:python-pcpp1:m4
21 Resultats, Darrera modificació:
2.1 File processing - XML files @info:cursos:pue:python-pcpp1:m5
18 Resultats, Darrera modificació:
4.1 Logging in Python @info:cursos:pue:python-pcpp1:m5
18 Resultats, Darrera modificació:
2.3 Extended function argument syntax @info:cursos:pue:python-pcpp1:m1
17 Resultats, Darrera modificació:
2.5 Working with the Canvas @info:cursos:pue:python-pcpp1:m3
16 Resultats, Darrera modificació:
3.1 The CSV module in Python @info:cursos:pue:python-pcpp1:m5
15 Resultats, Darrera modificació:
5.1 The configparser module @info:cursos:pue:python-pcpp1:m5
14 Resultats, Darrera modificació:
1.1 What is PEP? @info:cursos:pue:python-pcpp1:m2
11 Resultats, Darrera modificació:
1.8 Interacting with widget methods @info:cursos:pue:python-pcpp1:m3
11 Resultats, Darrera modificació:
1.9 Looking at variables @info:cursos:pue:python-pcpp1:m3
7 Resultats, Darrera modificació:
1.4 Coloring your widgets @info:cursos:pue:python-pcpp1:m3
6 Resultats, Darrera modificació: