Cerca
Heus ací els resultats de la cerca.
Resultats de text complet:
- 2.1 PEP 20 – The Zen of Python @info:cursos:pue:python-pcpp1:m2
- = 2.1 PEP 20 – The Zen of Python The **Zen of Python** is a collection of 19 aphorisms, which reflect the philosophy behind ... 2004. It’s one of the //Easter eggs// (i.e., hidden, secret messages or features) included in the Pyt... hs for Python design rules and decision making. Even though the "poem" seems to be imbued with contrad
- 3.1 PEP 8 – Introduction @info:cursos:pue:python-pcpp1:m2
- consistent, more readable, and more efficient. Even though some programming projects may adopt their ... observation:** our code will be read much more often than it will be written**. On the one hand, consistency is a crucial factor that determines code rea... tion is the most important. [...] However, know when to be inconsistent [...]. When in doubt, use your
- Python Professional Course Series: GUI Programming @info:cursos:pue:python-pcpp1:m3
- reens: phone, tablet, computer, TV set, fridge, oven, even washing machine or heating controller – all these things have a screen, most of them colored and many (more and more eve... rminals For a very long time (about 30 years or even longer) displays weren’t treated as a part of com
- 1.6 Making life easier with the requests module @info:cursos:pue:python-pcpp1:m4
- b **service** (sorry for all these serv..., we weren't able to avoid them) and we also need a tool sim... too powerful. It exposes lots of details which aren't necessary available at the higher levels of software design. The socket module is perfect when you want to understand network issues at the TCP ... evel and to learn which challenges the OS faces when it tries to establish, maintain, and close intern
- 2.3 A small lexicon of widgets - Part 3 @info:cursos:pue:python-pcpp1:m3
- user’s actions. Using an ''Entry'' is necessary when you are going to ask the user for any textual inf... rtunately, we don’t need its entire flexibility when we just want to enter and validate a line of text... a number of horizontally deployed **options**, often referred to as **items** or **entries**; * thes... it. Do you see that strange dashed line visible when you click the File main menu item? Don’t worry,
- 4.1 PEP 257 – Docstring Conventions @info:cursos:pue:python-pcpp1:m2
- ting** your code. So, what is the difference between comments and docstrings, and eventually between commenting and documenting code? Look at the table b... we want to show you some of the differences between comments and docstrings in Python: ^Comments ^Doc... here means both other programmers and you (e.g. when you go back to your code after some time) – someb
- 2.2 Inheritance and polymorphism — Inheritance as a pillar of OOP @info:cursos:pue:python-pcpp1:m1
- and expresses the fundamental relationships between classes: superclasses (parents) and their subclas... e going to show you how the mutual relations between the super- and subclasses work. We can say that:... classical problem named the diamond problem, or even the deadly diamond of death. The name reflects th... nfo(), which part of the code would be executed then? Python lets you implement such a class hierarch
- 2.9 Inheriting properties from built-in classes @info:cursos:pue:python-pcpp1:m1
- wn functionalities inherited from its parent or even parents and you can still access those attributes... le), and control over the types of elements is given to the mechanisms of the new class. As a result, when solving a domain problem, we focus on the problem... a ValueError exception is raised; * an overridden method ''%%__setitem__%%'', which is a magic meth
- 1.2 Working with class and instance data – instance variables @info:cursos:pue:python-pcpp1:m1
- Instance 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 i... ble, simply access it using the class name, and then provide the variable name. <code python> class D... ble contents of d1: {} </code> **Conclusion**: when you want to read the class variable value, you ca
- 2.6 Abstract classes @info:cursos:pue:python-pcpp1:m1
- nctionalities or an order in a class hierarchy. When you develop a system in a group of programmers, i... eprint for other classes, a kind of contract between a __class designer__ and a __programmer__: * t... , but if any of the methods is an abstract one, then the class becomes abstract. == What is an abstra... ase music format and corresponding methods for “open”, “play”, “get details”, “rewind”, etc., to maint
- 2.1 Python core syntax @info:cursos:pue:python-pcpp1:m1
- = 2.1 Python core syntax So far we have been using Python core operations that allow us to operate on ... data types. Now, we'll use the same function ''len()'' to get a number of elements of a tuple, list,... pecific operations **on different** data types, when operations are formulated using **the same** operators or instructions, or even functions. Python core syntax covers: * opera
- 5.1 Metaprogramming @info:cursos:pue:python-pcpp1:m1
- plementing decorators, overriding operators, or even implementing the properties protocol. It may loo... Tim Peters, the Python guru who authored the **Zen of Python**, expressed his feelings about metacla... anding of what is happening under Python's hood when classes are created. In Python, a metaclass is a... callable objects. Class decorators are applied when classes are instantiated; * metaclasses redirec
- 1.1 SQLite @info:cursos:pue:python-pcpp1:m5
- ations are still available after a few days, or even years. Do you know how that’s possible? Data is ... ting of email address, login, and password, and when you add new posts you send content that will be v... cross-platform, which means it can be copied between 32- and 64-bit systems. Isn't it amazing that yo... od required by the specification, but can be written by different programmers, and even by you. To us
- 1.1 Classes, Instances, Attributes, Methods — introduction @info:cursos:pue:python-pcpp1:m1
- OOP allows programmers to model interactions between objects in order to solve real-life problems in a... rendered in a web browser created with OOP, and even the mouse cursor image is displayed using an appl... instance — an instantiation of the class; very often used interchangeably with the term 'object'; * ... ry last section of this module, you'll see that even classes are instances. Why is everything in Pyth
- 4.1 Shallow and deep copy operations @info:cursos:pue:python-pcpp1:m1
- nd objects, and possible ways of copying them. When you spot the following clause: <code python> a_li... 's memory. Now the object has its identity; * then the object is populated with other objects. Now o... function is rarely used in applications. More often you’ll use it to debug the code or to experiment ... eachable in the scope in which the variable has been defined. You should remember to avoid such situat