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

Ғылым және технология

www.pydata.org
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
S/o to github.com/mycaule for the video timestamps!
Want to help add timestamps to our KZread videos to help with discoverability? Find out more here: github.com/numfocus/KZreadVi...

Пікірлер: 65

  • @gustavom8726
    @gustavom87262 жыл бұрын

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

  • @neontiger2007

    @neontiger2007

    2 жыл бұрын

    His amount of knowledge, self-confidence and pedagogy explaining all kinds of concepts and scenarios is definitely worth of all my admiration as a developer. What a sublime guy he is.

  • @sebastianpaez6132

    @sebastianpaez6132

    Жыл бұрын

    It is not crazy for me to say that the first 20 minutes of this talk taught me more than every programming class I had before I saw this for the first time ...

  • @richienguyen2703

    @richienguyen2703

    Жыл бұрын

    I think this lecture is truly one of the kind because you rarely see any python videos talking about these very niche Python concepts. Plus, his style of presentation is great.

  • @willd0g

    @willd0g

    2 ай бұрын

    Same ; and im here to revisit his vim skills.

  • @ihgnmah
    @ihgnmah2 жыл бұрын

    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

  • @dmitriyobidin6049
    @dmitriyobidin60492 жыл бұрын

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

  • @odanabunaga2505
    @odanabunaga25052 жыл бұрын

    James Powell for the President of Python please!

  • @111skal111
    @111skal1113 ай бұрын

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

  • @ConsuelaPlaysRS
    @ConsuelaPlaysRS Жыл бұрын

    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")

  • @omgwtfafterparty

    @omgwtfafterparty

    9 ай бұрын

    i think that currently to solve this kind of problems Id use ABC and abstractmethod decorator

  • @umairgillani699
    @umairgillani699 Жыл бұрын

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

  • @justtravelous9783
    @justtravelous97832 жыл бұрын

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

  • @tarik-xx-tarik2342
    @tarik-xx-tarik23422 жыл бұрын

    What a great lecture

  • @meowsqueak
    @meowsqueak2 жыл бұрын

    With the interleaving generator at 1:24:00, what does the client code actually look like? How does the user of this kind of generator function return control back to it, after the yields in-between first/second and second/third? Is this where next() and send() get used? Is there an idiomatic way to write the client side of a coroutine without next/send?

  • @antonioarana8002
    @antonioarana80022 жыл бұрын

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

  • @bensilburn
    @bensilburn2 жыл бұрын

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

  • @SpencerMckenithWilliams
    @SpencerMckenithWilliams2 жыл бұрын

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

  • @nikitasid4947
    @nikitasid49472 жыл бұрын

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

  • @utkucanaytac5417
    @utkucanaytac5417 Жыл бұрын

    the best explanation of decorators i ve ever seen

  • @hEmZoRz
    @hEmZoRz Жыл бұрын

    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.

  • @amortalbeing
    @amortalbeing2 жыл бұрын

    very well presented. really liked it thanks.

  • @Rashmi-bs09
    @Rashmi-bs096 ай бұрын

    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 .

  • @okdokie278
    @okdokie2782 жыл бұрын

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

  • @pythongabi
    @pythongabi2 жыл бұрын

    1:25:00 The equivalence of context manager metaphore in Java is try with resources I think, and to use an object with tey-with-resources it should implement either the AutoClosable or Closable interfaces.

  • @kuyajj68
    @kuyajj6810 ай бұрын

    Still the best advanced python talk.

  • @sinanabavi3812
    @sinanabavi38122 жыл бұрын

    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.

  • @Alexander-dj1jp

    @Alexander-dj1jp

    2 жыл бұрын

    I solved it with: "if not "bar" in body and not "Base" in name:"

  • @Alexander-dj1jp

    @Alexander-dj1jp

    2 жыл бұрын

    nvm he actually corrects it right after

  • @ozlemelih
    @ozlemelih2 жыл бұрын

    JPow uses python?

  • @huanxu5140
    @huanxu5140 Жыл бұрын

    An update for Python 3.11 in 2022 would be awesome!

  • @Michallote

    @Michallote

    5 ай бұрын

    Nothing of that has changed really

  • @arvindh4327
    @arvindh43272 жыл бұрын

    11:50 what's the behaviour of ❗mark does to the string?

  • @Pyroseza

    @Pyroseza

    2 жыл бұрын

    it's format syntax for conversion and tells the interpreter to format the string using the repr function, check here for more info: docs.python.org/3/library/string.html#format-string-syntax

  • @iamprageethanjula
    @iamprageethanjula2 жыл бұрын

    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.

  • @riicky_bobby

    @riicky_bobby

    2 жыл бұрын

    What’s the cost?

  • @Levy957

    @Levy957

    2 жыл бұрын

    @@riicky_bobby speed

  • @shilinwang2958
    @shilinwang2958 Жыл бұрын

    masterpiece

  • @ArpitRawat
    @ArpitRawat Жыл бұрын

    @53:55 - THIS 🙌

  • @TankaNafaka
    @TankaNafaka Жыл бұрын

    all we need is generator, context manager and decorators 😊

  • @meowsqueak
    @meowsqueak2 жыл бұрын

    The degree of those polynomials is actually 2 :)

  • @nulencode7660

    @nulencode7660

    6 ай бұрын

    He is obviously a Python expert but not a math expert.

  • @sahasananth987
    @sahasananth987 Жыл бұрын

    In 9:15 How is he getting the comment to push the 2 as a superscript?

  • @user-mg4lh5jx1j

    @user-mg4lh5jx1j

    9 ай бұрын

    I think he used a custom digraph in vim

  • @prcmmd
    @prcmmd2 жыл бұрын

    a was very usefule

  • @ZohanSyahFatomi
    @ZohanSyahFatomi2 жыл бұрын

    first time i see, vim coding like this.

  • @jamespaz4333
    @jamespaz43332 жыл бұрын

    I wish I could have that coding power :)

  • @joelrodriguez1232

    @joelrodriguez1232

    2 жыл бұрын

    Practice, practice, practice. That's what JPow would say.

  • @jitendrak999
    @jitendrak999 Жыл бұрын

    Sir i want hanuman ji source code please give me

  • @FAB199191
    @FAB199191 Жыл бұрын

    ass time stamp 07:54

  • @z-f772
    @z-f7723 ай бұрын

    7:54 muscle memory.

  • @merv893
    @merv893 Жыл бұрын

    Has anyone ever noticed that a lot of the best programmers are fairly rubbish at typing.

  • @makeshiftsavant
    @makeshiftsavant7 ай бұрын

    Reason why not to use vim - it took him 8:00 minutes to write the word "class"

  • @anomad6314
    @anomad63142 жыл бұрын

    yeah... i'm not learning Python

  • @germ4613

    @germ4613

    2 жыл бұрын

    What you meant to say is your not learning any coding or any programming language 🤣🤣🤣

  • @anomad6314

    @anomad6314

    2 жыл бұрын

    @@germ4613 may learn SQL... less programming, more database search... i think

  • @germ4613

    @germ4613

    2 жыл бұрын

    @@anomad6314 the problem is what jobs get you sql? Think about it. That's data analyst and scientist. They have to learn sql and python and excel.

  • @anomad6314

    @anomad6314

    2 жыл бұрын

    @@germ4613 change management.... great if you know excel and SQL, but virtually none require python etc...

  • @germ4613

    @germ4613

    2 жыл бұрын

    @@anomad6314 I'm looking at the list of all comptia certs and project+ seems like a business cert. I dont know how to describe it. Seems like a cert that can be used for many fields and companies. So why is it on a IT cert website?

  • @this-is-bioman
    @this-is-bioman Жыл бұрын

    A 2h presentation about solving problems that didn't even have to exist if python was strongly typed

  • @roar-with

    @roar-with

    2 ай бұрын

    How strong typing would remove decorators, generators, overloading, etc? The only place it could do something - when he was talking about subclassing

Келесі