ФорумПрограммированиеPython → A Guide to Python's Magic Methods

A Guide to Python's Magic Methods

  • adw0rd

    Сообщения: 22959 Репутация: N Группа: в ухо

    Spritz 22 марта 2012 г. 19:24

    Отличная статья о магических методах в Python!

    What are magic methods? They're everything in object-oriented Python. They're special methods that you can define to add "magic" to your classes. They're always surrounded by double underscores (e.g. __init__ or __lt__). They're also not as well documented as they need to be. All of the magic methods for Python appear in the same section in the Python docs, but they're scattered about and only loosely organized. There's hardly an example to be found in that section (and that may very well be by design, since they're all detailed in the language reference, along with boring syntax descriptions, etc.).


    http://www.rafekettler.com/magicmethods.html
    https://smappi.org/ - платформа по созданию API на все случаи жизни
  • adwo

    Сообщения: 913 Репутация: N Группа: Джедаи

    Spritz 24 марта 2012 г. 21:25, спустя 2 дня 2 часа

    классная статья. было бы время - перевел бы)

Пожалуйста, авторизуйтесь, чтобы написать комментарий!