* Cantinho Satkeys

Refresh History
  • FELISCUNHA: Votos de um santo domingo para todo o auditório  4tj97u<z
    19 de Outubro de 2025, 11:16
  • j.s.: tenham um excelente domingo  43e5r6 49E09B4F
    19 de Outubro de 2025, 10:32
  • j.s.: ghyt74 a todos  4tj97u<z
    19 de Outubro de 2025, 10:32
  • FELISCUNHA: dgtgtr   49E09B4F  e bom fim de semana  4tj97u<z
    17 de Outubro de 2025, 12:08
  • JPratas: try65hytr Pessoal  4tj97u<z htg6454y k7y8j0
    17 de Outubro de 2025, 03:34
  • j.s.: dgtgtr a todos  4tj97u<z
    15 de Outubro de 2025, 15:12
  • FELISCUNHA: ghyt74  pessoal  49E09B4F
    15 de Outubro de 2025, 11:56
  • Radio TugaNet: boas tardes
    14 de Outubro de 2025, 13:14
  • FELISCUNHA: dgtgtr   49E09B4F  e bom fim de semana  4tj97u<z
    11 de Outubro de 2025, 12:06
  • JPratas: try65hytr Pessoal  49E09B4F 2dgh8i k7y8j0 yu7gh8
    10 de Outubro de 2025, 03:59
  • FELISCUNHA: ghyt74  pessoal  4tj97u<z
    08 de Outubro de 2025, 11:44
  • joca34: ola amigos boas noite alguem este cd Disco Festa Portuguesa (Ao Vivo)
    07 de Outubro de 2025, 22:45
  • pxsofficial: alguem ainda tem o Mega Pack de Filmes Infantis Dublados PT-PT
    07 de Outubro de 2025, 21:22
  • FELISCUNHA: ghyt74   49E09B4F  Votos de um santo domingo para todo o auditório  4tj97u<z
    05 de Outubro de 2025, 11:03
  • j.s.: um santo domingo  49E09B4F
    05 de Outubro de 2025, 10:52
  • j.s.: ghyt74 a todos  49E09B4F
    05 de Outubro de 2025, 10:52
  • gitzbeka: tivi mate
    04 de Outubro de 2025, 18:21
  • FELISCUNHA: ghyt74   49E09B4F  e bom fim de semana   4tj97u<z
    03 de Outubro de 2025, 11:42
  • JPratas: try65hytr Pessoal  4tj97u<z 2dgh8i k7y8j0 yu7gh8
    03 de Outubro de 2025, 03:07
  • j.s.: dgtgtr a todos  4tj97u<z
    02 de Outubro de 2025, 16:26

Autor Tópico: Python Data model: Special methods in classes  (Lida 177 vezes)

0 Membros e 1 Visitante estão a ver este tópico.

Online mitsumi

  • Sub-Administrador
  • ****
  • Mensagens: 125711
  • Karma: +0/-0
Python Data model: Special methods in classes
« em: 03 de Junho de 2021, 10:32 »

MP4 | Video: h264, 1280x720 | Audio: AAC, 44.1 KHz, 2 Ch
Genre: eLearning | Language: English + srt | Duration: 23 lectures (1h 56m) | Size: 203.4 MB
Improve your classes to support well-known Python language features by implementing special, magic or dunder methods.

What you'll learn:
What is the Python data model?
How Python's language features map to Special Methods
Special methods like __str__, __len__, __getitem__, __init__, __hash__, __lt__ and many more!
Lots of practical examples
Object identity, equality, Container objects, Context Managers, Object instantiation

Requirements
Some experience writing classes in Python
Intermediate programming experience

Description
Level up your Python programming skills by learning the Python data model and start implementing magic methods in your classes.

Python has language features like iteration, subscripting (indexing), context managers, hashing, equality checking etc.

If you are writing classes, you want the user of your classes to leverage their existing knowledge of Python to make smart guesses how your classes work.

The Python datamodel describes the API to integrate your custom classes so they fit nicely into the existing language idioms.

For example, you want users of your classes to use a for-loop to iterate over your objects, you want them to be able to use equality operators and get the results they expect. And when they call the len function on your object, you need to return a number.

After this course you are able to map Python language features like:

indexers (subscripting) __getitem__

iterators __iter__, __next__

identity

hashing __hash__

equality __eq__, __ne__, __lt__, __gt__, __le__, __ge__

function calls __call__

object construction __new__, __init__

context managers __enter__, __exit__

to dunder methods, the secret weapon of your objects.

My name is Loek van den Ouweland and I'm a Python Trainer. I teach beginners how to create their first programs and I help professionals to understand Python better.

The feedback I get from my students is that the course is well structured with lot's of practical examples, they had a lot of fun during the training and it convinced them that programming at any level, is not magic, but a learnable skill!

Who this course is for
Python programmers who want understand Python better
Python programmers who want to understand how language features like built-in functions and operators map to special methods in classes


Download link:
Só visivel para registados e com resposta ao tópico.

Only visible to registered and with a reply to the topic.

Links are Interchangeable - No Password - Single Extraction