mirror of
https://github.com/jlu5/PyLink.git
synced 2024-12-25 20:22:45 +01:00
PUIDGenerator: allow custom counter start values
This commit is contained in:
parent
163f0099e7
commit
4e082c2bbf
4
utils.py
4
utils.py
@ -79,9 +79,9 @@ class PUIDGenerator():
|
|||||||
Pseudo UID Generator module, using a prefix and a simple counter.
|
Pseudo UID Generator module, using a prefix and a simple counter.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, prefix):
|
def __init__(self, prefix, start=0):
|
||||||
self.prefix = prefix
|
self.prefix = prefix
|
||||||
self.counter = 0
|
self.counter = start
|
||||||
|
|
||||||
def next_uid(self, prefix=''):
|
def next_uid(self, prefix=''):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user