{"comment":{"url":"https://api.github.com/repos/Djet78/hillel_homework_repository/comments/29473912","html_url":"https://github.com/Djet78/hillel_homework_repository/commit/327244bff9c0d1309c9c5be187611547f5862bb5#commitcomment-29473912","id":29473912,"node_id":"MDEzOkNvbW1pdENvbW1lbnQyOTQ3MzkxMg==","user":{"login":"dbradul","id":1180420,"node_id":"MDQ6VXNlcjExODA0MjA=","avatar_url":"https://avatars1.githubusercontent.com/u/1180420?v=4","gravatar_id":"","url":"https://api.github.com/users/dbradul","html_url":"https://github.com/dbradul","followers_url":"https://api.github.com/users/dbradul/followers","following_url":"https://api.github.com/users/dbradul/following{/other_user}","gists_url":"https://api.github.com/users/dbradul/gists{/gist_id}","starred_url":"https://api.github.com/users/dbradul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbradul/subscriptions","organizations_url":"https://api.github.com/users/dbradul/orgs","repos_url":"https://api.github.com/users/dbradul/repos","events_url":"https://api.github.com/users/dbradul/events{/privacy}","received_events_url":"https://api.github.com/users/dbradul/received_events","type":"User","site_admin":false},"position":75,"line":75,"path":"homework_37.py","commit_id":"327244bff9c0d1309c9c5be187611547f5862bb5","created_at":"2018-06-23T19:17:00Z","updated_at":"2018-06-23T19:17:00Z","author_association":"NONE","body":"Доверять пользователю назначение id лучше не стоит:\r\na) лишняя переменная, которая носит технический, а не содержательный характер\r\nb) потенциальный риск не обеспечить уникальность значений (где-то надо хранить уже выданные id?)\r\nЭто можно реализовать в самом классе:\r\n\r\n```\r\nclass A:\r\n    LAST_ID = 1\r\n\r\n    def __init__(self):\r\n        self.id = A.LAST_ID\r\n        A.LAST_ID += 1\r\n\r\na1 = A()\r\na2 = A()\r\nprint(a1.id, a2.id)\r\n```"}}
{"actor":{"display_login":"dbradul"}}