В глубь языка Python

Для программистов

Марк Пилгрим


Авторские права

Permission is granted to copy, distribute, and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in Приложение A, GNU Free Documentation License.

The example programs in this book are free software; you can redistribute and/or modify them under the terms of the Python license as published by the Python Software Foundation. A copy of the license is included in Приложение B, Python 2.1.1 license.

5 января 2003

Оригинал этой книги опубликовон по адресу http://diveintopython.org/, перевод на русский язык — по адресу http://diveinto.python.ru/. Если вы читаете ее в каком-либо другом месте, то, возможно, вы имеете дело не с самой последней версией.


Предисловие
1. Знакомство с языком Python
1.1. В глубь
1.2. Объявление функций
1.3. Документирование функций
1.4. Все является объектами
1.5. Отступы
1.6. Тестирование модулей
1.7. Словари
1.8. Списки
1.9. Кортежи
1.10. Определение переменных
1.11. Присваивание сразу нескольких значений
1.12. Форматированное представление
1.13. Обработка списков
1.14. Объединение и разбиение строк
1.15. Заключение
2. Сила самоанализа
2.1. В глубь
2.2. Необязательные и именованные аргументы
2.3. type, str, dir и другие встроенные функции
2.4. Получение атрибутов с помощью getattr
2.5. Фильтрование списков
2.6. Особенности операторов and и or
2.7. Использование lambda-функций
2.8. Объединяем все вместе
2.9. Заключение
3. Средства объектно-ориентированного программирования
3.1. В глубь
3.2. Импортирование модулей инструкцией from module import
3.3. Определение классов
3.4. Создание экземпляров классов
3.5. UserDict: a wrapper class
3.6. Special class methods
3.7. Advanced special class methods
3.8. Class attributes
3.9. Private functions
3.10. Handling exceptions
3.11. File objects
3.12. for loops
3.13. More on modules
3.14. The os module
3.15. Putting it all together
3.16. Summary
A. GNU Free Documentation License
A.0. Preamble
A.1. Applicability and definitions
A.2. Verbatim copying
A.3. Copying in quantity
A.4. Modifications
A.5. Combining documents
A.6. Collections of documents
A.7. Aggregation with independent works
A.8. Translation
A.9. Termination
A.10. Future revisions of this license
A.11. How to use this License for your documents
B. Python 2.1.1 license
B.A. History of the software
B.B. Terms and conditions for accessing or otherwise using Python
B.B.1. PSF license agreement
B.B.2. BeOpen Python open source license agreement version 1
B.B.3. CNRI open source GPL-compatible license agreement
B.B.4. CWI permissions statement and disclaimer
n
Next Page
p
Previos Page
h
Book Home
u
Go Up One Level
?
Press ? for Help
esc
Hide Help
Your Ad Here