SF.net SVN: fclient: [145] trunk/sandbox/fcp/fcp2_0_params.py
Status: Pre-Alpha
Brought to you by:
jurner
|
From: <ju...@us...> - 2008-02-05 12:11:05
|
Revision: 145
http://fclient.svn.sourceforge.net/fclient/?rev=145&view=rev
Author: jurner
Date: 2008-02-05 04:11:06 -0800 (Tue, 05 Feb 2008)
Log Message:
-----------
added prefix param
Modified Paths:
--------------
trunk/sandbox/fcp/fcp2_0_params.py
Modified: trunk/sandbox/fcp/fcp2_0_params.py
===================================================================
--- trunk/sandbox/fcp/fcp2_0_params.py 2008-02-05 12:10:33 UTC (rev 144)
+++ trunk/sandbox/fcp/fcp2_0_params.py 2008-02-05 12:11:06 UTC (rev 145)
@@ -132,16 +132,19 @@
-def newUuid(uuids=None):
+def newUuid(prefix=None, uuids=None):
"""Creates a new unique identifier
+ @param prefix: (str) identifier prefix or None
@param uuids: if desired any iterable containing uuids to enshure the identifier is unique in the iterable
@return: (str) uuid
"""
- uuid_ = uuid.uuid_time()
+ if prefix is None:
+ prefix = ''
+ uuid_ = prefix + uuid.uuid_time()
if uuids is not None:
while uuid_ in uuids:
- uuid_ = uuid_time()
+ uuid_ = prefix + uuid_time()
return uuid_
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|