from functools import partial try: from .location import Location except ImportError: from location import Location class Emitter(Location): """ Emit a signal from position x_0 (and time t_0) """ def __repr__(self): return "Emitter({})".format(repr(self.x)) def emit(self, travel_signal: callable) -> callable: return partial(travel_signal, x_0=self.x)