10 lines
190 B
Python
10 lines
190 B
Python
from itertools import count
|
|
|
|
|
|
class AgentIdFactory(object):
|
|
_id_counter = count(start=0)
|
|
|
|
@staticmethod
|
|
def get_next_id() -> int:
|
|
return next(AgentIdFactory._id_counter)
|