Merge pull request #340 from Alexcn/patch-2

Update p25_creating_cached_instances.rst
This commit is contained in:
XiongNeng
2022-02-01 12:09:49 +08:00
committed by GitHub

View File

@@ -10,7 +10,7 @@
----------
解决方案
----------
这种通常是因为你希望相同参数创建的对象单例的。
这种通常是因为你希望相同参数创建的对象单例的。
在很多库中都有实际的例子,比如 ``logging`` 模块,使用相同的名称创建的 ``logger`` 实例永远只有一个。例如:
.. code-block:: python