las

Cerca

Heus ací els resultats de la cerca.

2.1 PEP 20 – The Zen of Python @info:cursos:pue:python-pcpp1:m2
8 Resultats, Darrera modificació:
integer number: 15.6 Traceback (most recent call last): File "<pyshell#4>", line 1, in <module> ... le, if you want to take the user’s first name and last name, and display them on the screen, you can do... on> first_name = input("Enter your first name: ") last_name = input("Enter your last name: ") print("Your name is:", first_name, last_name) print("Your nam
1.2 Working with class and instance data – instance variables @info:cursos:pue:python-pcpp1:m1
7 Resultats, Darrera modificació:
return message class FixedPhone(Phone): last_SN = 0 def __init__(self, number): super().__init__(number) FixedPhone.last_SN += 1 self.SN = 'FP-{}'.format(FixedPhone.last_SN) class MobilePhone(Phone): last_SN = 0 def __init__(self, number): super().__in
2.3 A small lexicon of widgets - Part 3 @info:cursos:pue:python-pcpp1:m3
7 Resultats, Darrera modificació:
racer remembers its **previous** state (using the last_s variable) and restores the field to this state... 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 = tk
3.1 Advanced techniques of creating and serving exceptions @info:cursos:pue:python-pcpp1:m1
6 Resultats, Darrera modificació:
in the object. * **end** – the index after the last invalid data in the object. See the output of t... ges): <code ; output> Traceback (most recent call last): File "exceptions#030.py", line 6, in <module... exception occurred: Traceback (most recent call last): File "exceptions#030.py", line 8, in <module... se is a wide one and normally should be used as a last resort to catch all unhandled exceptions. It’s s
1.2 How to use sockets in Python @info:cursos:pue:python-pcpp1:m4
5 Resultats, Darrera modificació:
**. We don't need anything more. This is why the last line of our code look as follows: ''print(repr(a... ? a.non.existent.name Traceback (most recent call last): File "cli.py", line 5, in <module> sock.... to? anonexistentname Traceback (most recent call last): File "cli.py", line 5, in <module> sock.... to? dedicated.server Traceback (most recent call last): File "cli2.py", line 6, in <module> sock
2.5 Working with the Canvas @info:cursos:pue:python-pcpp1:m3
4 Resultats, Darrera modificació:
= 2.5 Working with the Canvas == Canvas Our last meeting is devoted to the ''Canvas'' – a widget that b... rawing a line, with the difference being that the last segment (connecting the first and the last points) in the chain is drawn **automatically** (you don’t... ed to specify the same point as the first and the last (x,y) pair: <code python> canvas.create_polygon
2.1 Python core syntax @info:cursos:pue:python-pcpp1:m1
2 Resultats, Darrera modificació:
/code> <code ; output>Traceback (most recent call last): File "core#010.py", line 11, in print(p... tation for the built-in integer type. Look at the last lines of the output – it contains information ab
2.3 Extended function argument syntax @info:cursos:pue:python-pcpp1:m1
2 Resultats, Darrera modificació:
amed *args and %%**%%kwargs) should be put as the last two parameters in a function definition. Their n... 50, 'argument2': '66'} <class 'dict'> </code> The last example in this section shows how to combine *ar
2.4 Decorators @info:cursos:pue:python-pcpp1:m1
2 Resultats, Darrera modificació:
ction.__name__)) return function </code> The last lines are responsible for both method invocation... bject – in our case it is a decorated class. The last thing we should do is decorate the Car class: <c
2.6 Abstract classes @info:cursos:pue:python-pcpp1:m1
2 Resultats, Darrera modificació:
lcome to Green Field! Traceback (most recent call last): (...) bp = BluePrint() TypeError: Can't in... lcome to Green Field! Traceback (most recent call last): (...) rf = RedField() TypeError: Can't ins
4.2 Serialization of Python objects using the pickle module @info:cursos:pue:python-pcpp1:m1
2 Resultats, Darrera modificació:
sted: <code ; output> Traceback (most recent call last): File "main.py", line 4, in <module> data... eive: <code ; output> Traceback (most recent call last): File "main.py", line 4, in <module> data
1.1 What is PEP? @info:cursos:pue:python-pcpp1:m2
2 Resultats, Darrera modificació:
e, as you may expect, we’re going to focus on the last of the many PEPs. == In the jungle of PEPs Ther... t – you never know when you’re going to need it! Last but not least, PEP 1 defines: * //Python’s St
1.1 SQLite @info:cursos:pue:python-pcpp1:m5
2 Resultats, Darrera modificació:
or this purpose, we’ll use the ''TEXT'' type. The last column called priority defines the priority of o... umns: <code sql>SELECT * FROM tasks;</code> The last variant will display the values saved in the ''i
1.1 Classes, Instances, Attributes, Methods — introduction @info:cursos:pue:python-pcpp1:m1
1 Resultats, Darrera modificació:
ct (functions, modules, lists, etc.). In the very last section of this module, you'll see that even cla
2.2 Inheritance and polymorphism — Inheritance as a pillar of OOP @info:cursos:pue:python-pcpp1:m1
1 Resultats, Darrera modificació:
/code> <code ; output>Traceback (most recent call last): File "diamond.py", line 13, in class D(
2.5 Different faces of Python methods @info:cursos:pue:python-pcpp1:m1
1 Resultats, Darrera modificació:
2.7 Encapsulation @info:cursos:pue:python-pcpp1:m1
1 Resultats, Darrera modificació:
4.1 Shallow and deep copy operations @info:cursos:pue:python-pcpp1:m1
1 Resultats, Darrera modificació:
4.1 PEP 257 – Docstring Conventions @info:cursos:pue:python-pcpp1:m2
1 Resultats, Darrera modificació:
1.7 Four magic letters: CRUD @info:cursos:pue:python-pcpp1:m4
1 Resultats, Darrera modificació:
3.1 The CSV module in Python @info:cursos:pue:python-pcpp1:m5
1 Resultats, Darrera modificació:
4.1 Logging in Python @info:cursos:pue:python-pcpp1:m5
1 Resultats, Darrera modificació:
5.1 The configparser module @info:cursos:pue:python-pcpp1:m5
1 Resultats, Darrera modificació: