Merge pull request #340 from Alexcn/patch-2
Update p25_creating_cached_instances.rst
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
----------
|
||||
解决方案
|
||||
----------
|
||||
这种通常是因为你希望相同参数创建的对象时单例的。
|
||||
这种通常是因为你希望相同参数创建的对象是单例的。
|
||||
在很多库中都有实际的例子,比如 ``logging`` 模块,使用相同的名称创建的 ``logger`` 实例永远只有一个。例如:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
Reference in New Issue
Block a user