Skip to content

issue of example1.py of chapter 8 #12

@zangetsudo

Description

@zangetsudo

hi, David

i have just tested
python-cookbook/src/8/lazily_computed_attributes/example1.py
but happened to findout it does not workout like what the book tell, which i meam python cookbook, 3rd.
After a little research, i found that you need to put a object there, like this :
class lazyproperty(object):
but i dont konw why.
please tell me if you know.

PS:

TEST based on

PyCharm 2016.3.1
Build #PY-163.9735.8, built on December 15, 2016
Subscription is active until February 25, 2017
JRE: 1.8.0_111-b14 amd64
JVM: Java HotSpot(TM) 64-Bit Server VM by Oracle Corporation

Python
2.7.11 (v2.7.11:6d1b6a68f775, Dec 5 2015, 20:40:30) [MSC v.1500 64 bit (AMD64)] on win32

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions