en
Luciano Ramalho

Fluent Python

Сообщить о появлении
Загрузите файл EPUB или FB2 на Букмейт — и начинайте читать книгу бесплатно. Как загрузить книгу?
Python's simplicity lets you become productive quickly, but this often means you aren't using everything it has to offer. With this hands-on guide, you'll learn how to write effective, idiomatic Python code by leveraging its best—and possibly most neglected—features. Author Luciano Ramalho takes you through Python's core language features and libraries, and shows you how to make your code shorter, faster, and more readable at the same time.
Many experienced programmers try to bend Python to fit patterns they learned from other languages, and never discover Python features outside of their experience. With this book, those Python programmers will thoroughly learn how to become proficient in Python 3.
This book covers:
Python data model: understand how special methods are the key to the consistent behavior of objectsData structures: take full advantage of built-in types, and understand the text vs bytes duality in the Unicode…
Эта книга сейчас недоступна
1 861 бумажная страница
Уже прочитали? Что скажете?
👍👎

Цитаты

  • Глеб Кушедовцитирует3 года назад
    DIAL_CODES = [
    ... (86, 'China'),
    ... (91, 'India'),
    ... (1, 'United States'),
    ... (62, 'Indonesia'),
    ... (55, 'Brazil'),
    ... (92, 'Pakistan'),
    ... (880, 'Bangladesh'),
    ... (234, 'Nigeria'),
    ... (7, 'Russia'),
    ... (81, 'Japan'),
  • Глеб Кушедовцитирует3 года назад
    Chapter 1, “Data Structures” of Python Cookbook, 3rd Edition (O’Reilly) by David Beazley and Brian K. Jones has many recipes focusing on sequences, including “Recipe 1.11. Naming a Slice,” from which I learned the trick of assigning slices to variables to improve readability, illustrated in our Example 2-11.
    The second edition of Python Cookbook was written for Python 2.4, but much of its code works with Python 3, and a lot of the recipes in Chapters 5 and 6 deal with sequences. The book was edited by Alex Martelli, Anna Martelli Ravenscroft, and David Ascher, and it includes contributions by dozens of Pythonistas. The third edition was rewritten from scratch, and focuses more on the semantics of the language—particularly what has changed in Python 3—while the older volume emphasizes pragmatics (i.e., how to apply the language to real-world problems). Even though some of the second edition solutions are no longer the best approach, I honestly think it is worthwhile to have both editions of Python Cookbook on hand.
    The official Python Sorting HOW TO has several examples of advanced tricks for using sorted and list.sort.
    PEP 3132 — Extended Iterable Unpacking is the canonical source to read about the new use of *extra as a target in parallel assignments. If you’d like a glimpse of Python evolving, Missing *-unpacking generalizations is a bug tracker issue proposing even wider use of iterable unpacking notation. PEP 448 — Additional Unpacking Generalizations resulted from the discussions in that issue. At the time of this writing, it seems likely the proposed changes will be merged to Python, perhaps in version 3.5.
  • Глеб Кушедовцитирует3 года назад
    An object is hashable if it has a hash value which never changes during its lifetime (it needs a __hash__() method), and can be compared to other objects (it needs an __eq__() method). Hashable objects which compare equal must have the same hash value. […]
fb2epub
Перетащите файлы сюда, не более 5 за один раз