Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.095 X-Spam-Evidence: '*H*': 0.82; '*S*': 0.01; 'url:github': 0.09; 'subject:ABC': 0.16; 'hey': 0.18; 'all,': 0.19; 'message- id:@mail.gmail.com': 0.30; 'class': 0.32; 'ago': 0.33; "i'd": 0.34; 'received:google.com': 0.35; 'should': 0.36; 'to:addr :python-list': 0.38; 'anything': 0.39; 'to:addr:python.org': 0.39; 'backs': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=Ltxv2O5aXyGB/xmoGc1eBF92U1gkdh7ARI4ODgWGxGs=; b=SVsyAYEhWDaeNvbo+TrIg41m3U57Fly+J4CW7felymFf6C8qFY87EZuoocWAecHeQ8 nJMs6QUvvx6uNaoDKZwdgQUfW8rqCkVYYmFMlDXxIOr24F7FvYwsnJEK9GaDMuZrw7bv 3Lr/wbAoznSAEe6ikpFziG3FnbJuVkcmhpvG7xmjHG9YZmK9j4m2QjHN4gGeclGF8ATv dl3mAZavza9ko0rDtnI70vPnr83h+/6KgqRtlxmDbQ9ixQsCC/x7qiHtqh5diJurT5wM qSP5DvmpHGER/UNJvvpGU3ChfLf2bUZV2h8k/UTc30brUGgfNksgbGYuMH8pLg3kFFtX KxHA== MIME-Version: 1.0 X-Received: by 10.194.78.141 with SMTP id b13mr8387303wjx.32.1386876405953; Thu, 12 Dec 2013 11:26:45 -0800 (PST) Date: Thu, 12 Dec 2013 11:26:45 -0800 Subject: ABC hackery From: Demian Brecht To: Python Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 12 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1386876800 news.xs4all.nl 2942 [2001:888:2000:d::a6]:54406 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:61745 Hey all, Thought I'd share some fun I had some time ago when digging into abcs and metaclasses: https://gist.github.com/demianbrecht/6944269. The implementation piggy backs off of abcs to achieve "class A should look like class B" type functionality without using inheritance. Not recommended for anything outside of POC :) -- Demian Brecht http://demianbrecht.github.com