Method Chaining Classes in Python

Publié le: 11 avril 2022
sur la chaîne: mCoding
74,359
3.8k

Method chaining, cascading, or the "Fluent API".

This style of programming involves having methods of a class return the object they operate on in order to allow a subsequent method call. This is used to chain mutations of an instance or can also be used creating copies for immutable objects. This is not the most common style of programming, but it does have some niche uses, which we explore in this video.

― mCoding with James Murphy (https://mcoding.io)

Source code: https://github.com/mCodingLLC/VideosS...
SQLAlchemy: https://docs.sqlalchemy.org/en/14/orm...
pyjanitor: https://pyjanitor-devs.github.io/pyja...

SUPPORT ME ⭐
---------------------------------------------------
Patreon:   / mcoding  
Paypal: https://www.paypal.com/donate/?hosted...
Other donations: https://mcoding.io/donate

Top patrons and donors: Jameson, Laura M, Dragos C, Vahnekie, John Martin, Casey G

BE ACTIVE IN MY COMMUNITY 😄
---------------------------------------------------
Discord:   / discord  
Github: https://github.com/mCodingLLC/
Reddit:   / mcoding  
Facebook:   / james.mcoding  

CHAPTERS
---------------------------------------------------
0:00 Intro
0:12 Basic example
1:20 Immutable examples
2:21 SQLAlchemy select
3:18 Pyjanitor example


Sur cette page du site, vous pouvez voir la vidéo en ligne Method Chaining Classes in Python durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur mCoding 11 avril 2022, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 74,359 fois et il a aimé 3.8 mille téléspectateurs. Bon visionnage!