James Powell: So you want to be a Python expert? | PyData Seattle 2017

preview_player
Показать описание

PyData is an educational program of NumFOCUS, a 501(c)3 non-profit organization in the United States. PyData provides a forum for the international community of users and developers of data analysis tools to share ideas and learn from each other. The global PyData network promotes discussion of best practices, new approaches, and emerging technologies for data management, processing, analytics, and visualization. PyData communities approach data science using many languages, including (but not limited to) Python, Julia, and R.

PyData conferences aim to be accessible and community-driven, with novice to advanced level presentations. PyData tutorials and talks bring attendees the latest project features along with cutting-edge use cases.

0:00 About PyData and being proficient in Python
4:09 Important features of Python and audience survey
7:40 Data model methods
10:14 __init__ method
11:15 __repr__ method
12:17 __add__ method
15:51 __len__ method
18:42 __call__ method
20:50 Metaclasses and the problem of writing safe library code
27:00 Contraints on the library code using assert
32:33 Compile-time vs run time executable code
34:42 Disassembling class code and using __build_class__
40:26 Constraining library code with the metaclass pattern
47:22 Introducing decorators
49:07 Code inspection
57:36 Writing a timer function
59:42 Decorator syntactic sugar
1:03:00 Writing a ntimes decorator
1:06:32 Wrapping functions into class
1:10:51 Eager execution
1:14:02 __iter__ and __next__ methods
1:17:40 yield and the Generator syntax
1:20:35 Coroutines and interleaving
1:24:35 Context Managers
1:25:30 Setup and teardown of resources
1:28:38 Applying to SQL transactions
1:30:10 __enter__ and __exit__ methods
1:32:30 Links between generators and context managers
1:36:02 Refactoring the SQL query code
1:37:52 Wrapping up
1:40:04 Opinions on writing clear code in Python
1:48:18 Q&A

Рекомендации по теме
Комментарии
Автор

After almost 5 years, I keep coming back to this lecture for guidance. This is way better than any python course out there

gustavom
Автор

06:41 Data Model Protocol (Dunder Method)
20:50 Meta Class
47:22 Decorator
01:06:32 Generator
01:24:35 Context Manager
01:37:52 Summary
01:48:18 Q&A

ihgnmah
Автор

If only every talk on every it conference was as interesting and useful as this one.

dmitriyobidin
Автор

I can't believe how good this instructor is. This is a terrific live demo training course.

skal
Автор

James Powell for the President of Python please!

odanabunaga
Автор

This is one of the best live demo explanation of advance python concepts.. Really helpful stuff

umairgillani
Автор

For the `__init_subclass__` definition at 46:51, you can do something like
class Base:
def foo(self):
return self.bar()
def __init_subclass__(cls) -> None:
try:
bar = getattr(cls, 'bar')
if not callable(bar):
raise TypeError("bad user class: 'bar' must be a callable method")
except AttributeError:
raise TypeError("bad user class: 'bar' method not found")

ConsuelaPlaysRS
Автор

great lecture and the approach to make the advanced topic so easy to understand.

justtravelous
Автор

Just what this incredible person says about the books in the beggining is exactly what all us feel like

antonioarana
Автор

references is the best here. I will always keep this as one of my best resources.

SpencerMckenithWilliams
Автор

Clear and well-executed lecture with illuminating examples, but I was still left with one big question - which is, how the hell do we have an access to this kind of stuff, free of charge.

hEmZoRz
Автор

the best explanation of decorators i ve ever seen

utkucanaytac
Автор

yes his talks are eye opener for me . I never Enjoyed a python like Truely entertaining and gem of knowledge here . Powerhouse I should say :) Thanks to @James Powell for keeping talks interesting and Curios it really keep our brains Busy and focused when you deliver talk like this .

Rashmi-bs
Автор

Вот молодец, ничего не скажешь. Синтакс побоку, главное правильный взгляд на вещи.

nikitasid
Автор

@19:35, I think we can implement the __call__ function to return the value of the polynomial for value x.

metecantimur
Автор

Great presentation! Advanced techniques but explained very clearly - that guy is good :)

bensilburn
Автор

Where can we find more excellent lectures like this one??

okdokie
Автор

I am a C++ dev, and seeing all the function details at runtime. WOW... I should move to python. LOL. Remember it has a cost associated with.

iamprageethanjula
Автор

An update for Python 3.11 in 2022 would be awesome!

huanxu
Автор

Actually, the code in 42:17 does not result in the desired behavior. Once we import Base in user.py, python finds no bar methods in the Base class and raises an error.

sinanabavi