This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import inspect | |
class GravitationalError(Exception): | |
pass | |
class Fly(object): | |
def __get__(self, instance=None, owner=None): | |
def fly(*args, **kwargs): | |
alt_str = "Flying at the height of %d lines. " % owner.altitude |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Dummy(object): | |
answer = 42 | |
class Foo: | |
pass | |
class Bar: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){$('.commentarea%20.tagline').each(function(){var%20u=$(this).find('a.author'),t=$(this).find('.unvoted').html();var%20p=t?t.split('%20')[0]:"None";$(this).empty().append('<span%20style="color:#00f;font-weight:bold">def%20</span>').append(u).append('(points='+p+'):')});$('.commentarea%20.usertext-body').css('padding-left',24).find('.md').css('color','#393').prepend('"""').append('"""');$('.commentarea%20.flat-list.buttons').each(function(){$(this).appendTo($($(this).parents('.comment')[0]).css('padding-bottom','16px'));$(this).find('li').prepend('<span%20style="color:#00f;font-weight:bold;padding-left:42px">return</span>%20').not('.first').remove()})})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
from json.decoder import JSONArray | |
from json.scanner import py_make_scanner | |
class UnorderedList(list): | |
""" | |
Works like a normal list, except the order of elements doesn't matter on | |
comparison |