Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Python metaclasses

Name: Anonymous 2010-08-08 0:23

               ____
  m n _∩      /∵∴∵∴\      ∩_ n m
⊂二⌒___)     /∵∴∵∴∵∴\    (___⌒二⊃
   \∵∴\   /∵:(・)∴∴.(・)∵ |   /∴∵/
     \∵∴\  |∵∴/ ○\∵∴|  /∴∵/
      \∵∴\|∵ /三 | 三ヽ∵|/∴∵/
        \∵∴|∵.| __|__  |∵|∴∵/
         \∵\ |  ===   |/∵/         how do they work?
           \∵ \___/∵/
            |∴∵━○━∵∴|           ∩
            |∴/___\∴|           | ヽ
            |∴| \_/ .|∴|_______丿  )
            |∴\___/∴∵∴∵∴∵∴∵:|  (
           /∴∵∴∵∴∵∴∵∴∵∴∵∴∴: |   )
         /∴∵∴/ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄` -´
        /∴∵∴/
       (∴∵∴ (
        \∵∴∵\
         \∵∴∵\
           \∵∴∵|⌒ヽ
            \∵/   ノ
              | ̄  /
             ノ   /
            ⊂、_ノ                tanasinn

Name: Anonymous 2010-08-08 1:15

They don't.

Name: Anonymous 2010-08-08 12:42

http://docs.python.org/3.1/reference/datamodel#customizing-class-creation

They quite simply allow you to intervene in the creation of the class itself, i.e. at the time of definition.  They also hold class methods for e.g. determining inheritance.
In short, they are classes for classes.

Most Python programmers will never write a metaclass in their lifetime, but they are useful when creating frameworks.

Name: Anonymous 2010-08-08 14:40

>>3
Facepalm.exe.

This is the shit that is destroying LISP.

Name: Anonymous 2010-08-08 14:43

>>4
back to 7chan please

Name: Anonymous 2010-08-08 17:07

>>4
Lisp is destroying Lisp.  If Lisp had simple and readable syntactic sugar for doing standard class-based OO, then it would probably have similar hooks for customisation as well, like some sort of :metaclass option.

Name: Anonymous 2010-08-08 17:54

>>6
I lol'd

Name: Anonymous 2010-08-10 11:32

>>6
Can't tell if joking

Name: ​​​​​​​​​​ 2010-10-22 13:42

Name: Anonymous 2010-11-15 22:33

Name: Anonymous 2010-12-17 1:27

Are you GAY?
Are you a NIGGER?
Are you a GAY NIGGER?

If you answered "Yes" to all of the above questions, then GNAA (GAY NIGGER ASSOCIATION OF AMERICA) might be exactly what you've been looking for!

Name: Anonymous 2011-02-02 23:44

Name: Anonymous 2013-01-19 23:45

/prog/ will be spammed continuously until further notice. we apologize for any inconvenience this may cause.

Don't change these.
Name: Email:
Entire Thread Thread List