35 lines
575 B
Python
35 lines
575 B
Python
#! /usr/bin/env python
|
|
# -*- coding: utf-8 -*-
|
|
# vim:fenc=utf-8
|
|
#
|
|
# Copyright © 2017 lafrite <lafrite@Poivre>
|
|
#
|
|
# Distributed under terms of the MIT license.
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
|
|
class RdLeaf:
|
|
""" Random leaf
|
|
|
|
"""
|
|
|
|
def __init__(self, name):
|
|
self._name = name
|
|
self.rdleaf = True
|
|
|
|
@property
|
|
def name(self):
|
|
return self._name
|
|
|
|
def replace(self, computed):
|
|
return computed[self.name]
|
|
|
|
def __str__(self):
|
|
return "{" + self.name + "}"
|
|
|
|
def __repr__(self):
|
|
return f"<{self.__class__.__name__} {self.__str__}>"
|