学习路径
Python 编程
创建您的免费帐户
继续使用 Google显示更多选项或
深受数千家公司学习者的喜爱
需要团队培训?
企业版试用学习路径描述
Python 编程
先决条件
Python 编程基础Chapter
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.
Chapter
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.
Chapter
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.
Course
学习编写高效代码,快速执行并巧妙分配资源,避免不必要的开销。
Course
了解模块化、文档和自动化测试,帮助你更快、更可靠地解决数据科学问题。
Course
Master Python testing: Learn methods, create checks, and ensure error-free code with pytest and unittest.
Course
掌握面向对象编程(OOP)的基础概念,构建自定义类和对象!
Project
Review a data analysis workflow for adherence to Python standards and best-practices.
加入超过19百万学习者,今天就开始Python 编程 !
创建您的免费帐户
继续使用 Google显示更多选项或
通过 DataCamp for Mobile 提升您的数据技能
随时随地通过我们的移动课程和每日 5 分钟编程挑战提升技能。