我已通过以下两种不同的方法生成了一个ObjectId:
user@ubuntu:~$ python
Python 2.7.1+ (r271:86832, Apr 11 2011, 18:05:24)
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> # Method one
>>> from bson.objectid import ObjectId
>>> idA = ObjectId()
>>> print(idA)
4e9c45b91d41c8079a000000
>>> # Method two
>>> import bson
>>> idB = bson.ObjectId()
>>> print(idB)
4e9c45ca1d41c8079a000001
问题> 这两种方法有什么区别?我应该在什么情况下使用哪个?
谢谢