Kurs
Pisanie funkcji w Pythonie
ŚredniozaawansowanyPoziom umiejętności
Zaktualizowano 11.2025
PythonProgramming4 godz.15 filmów46 Ćwiczeń3,650 XP110K+Zaświadczenie o ukończeniu
Utwórz bezpłatne konto
Kontynuuj z GooglePokaż więcej opcjilub
Kontynuując, akceptujesz nasze Warunki korzystania, naszą Politykę prywatności oraz to, że Twoje dane są przechowywane w USA.
Uwielbiany przez kursantów z tysięcy firm
Szkolisz zespół?
Wypróbuj dla firmOpis kursu
Wymagania wstępne
Python Toolbox1
Best Practices
The goal of this course is to transform you into a Python expert, and so the first chapter starts off with best practices when writing functions. You'll cover docstrings and why they matter and how to know when you need to turn a chunk of code into a function. You will also learn the details of how Python passes arguments to functions, as well as some common gotchas that can cause debugging headaches when calling functions.
2
Context Managers
If you've ever seen the "with" keyword in Python and wondered what its deal was, then this is the chapter for you! Context managers are a convenient way to provide connections in Python and guarantee that those connections get cleaned up when you are done using them. This chapter will show you how to use context managers, as well as how to write your own.
3
Decorators
Decorators are an extremely powerful concept in Python. They allow you to modify the behavior of a function without changing the code of the function itself. This chapter will lay the foundational concepts needed to thoroughly understand decorators (functions as objects, scope, and closures), and give you a good introduction into how decorators are used and defined. This deep dive into Python internals will set you up to be a superstar Pythonista.
4
More on Decorators
Now that you understand how decorators work under the hood, this chapter gives you a bunch of real-world examples of when and how you would write decorators in your own code. You will also learn advanced decorator concepts like how to preserve the metadata of your decorated functions and how to write decorators that take arguments.
Pisanie funkcji w Pythonie
Kurs ukończony
Zdobądź zaświadczenie o ukończeniu
Dodaj to poświadczenie do swojego profilu LinkedIn, CV lub życiorysuUdostępnij to w mediach społecznościowych i podczas oceny wyników pracyZapisz się teraz
Dołącz do ponad 19 milionów kursantów i zacznij Pisanie funkcji w Pythonie już dziś!
Utwórz bezpłatne konto
Kontynuuj z GooglePokaż więcej opcjilub
Kontynuując, akceptujesz nasze Warunki korzystania, naszą Politykę prywatności oraz to, że Twoje dane są przechowywane w USA.
Rozwijaj swoje umiejętności w zakresie danych dzięki DataCamp dla urządzeń mobilnych
Rób postępy w podróży dzięki naszym kursom mobilnym i codziennym 5-minutowym wyzwaniom kodowania.