<commit_before># coding: UTF-8
from __future__ import (absolute_import, division,
                        print_function, unicode_literals)

import pygame


class GameDiv(object):

    def __init__(self, x=0, y=0, children=None, condition=None, name=""):
        if not children:
            children = []
        if not condition:
            condition = lambda: True
        self.condition = condition
        self.x = x
        self.y = y
        self.children = children
        self.name = name

    def draw(self, screen, x=0, y=0):
        if not self.condition():
            return<commit_msg>#25: atributo lazy<commit_after># coding: UTF-8
from __future__ import (absolute_import, division,
                        print_function, unicode_literals)

import pygame
import types


class LazyAttribute(object):

    def __init__(self, name):
        self.name = name

    def __get__(self, instance, owner):
        return instance.__dict__[self.name]()

    def __set__(self, instance, value):
        instance.__dict__[self.name] = (
            value if isinstance(value, types.FunctionType) else lambda: value)

    def __delete__(self, instance):
        del instance.__dict__[self.name]


class GameDiv(object):

    x = LazyAttribute('_x')
    y = LazyAttribute('_y')

    def __init__(self, x=0, y=0, children=None, condition=None, name=""):
        if not children:
            children = []
        if not condition:
            condition = lambda: True
        self.condition = condition
        self.x = x
        self.y = y
        self.children = children
        self.name = name

    def draw(self, screen, x=0, y=0):
        if not self.condition():
            return
{'fraction_non_alphanumeric': 0.10224586288416075, 'fraction_numerical': 0.0070921985815602835, 'mean_word_length': 2.2003780718336485, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4102958', 'n_tokens_mistral': 497, 'n_tokens_neox': 477, 'n_words': 137}