Skip to content

[refactoring] #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
{
"python.formatting.provider": "black",
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[markdown]": {
"editor.wordWrap": "on",
"editor.quickSuggestions": false,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[python]": {
"editor.defaultFormatter": "ms-python.python"
},
"python.linting.pylintEnabled": false,
"python.linting.flake8Enabled": true,
"python.linting.enabled": true,
"editor.defaultFormatter": "ms-python.python"
"python.linting.flake8Args": ["--max-line-length=100"],
"python.formatting.provider": "black",
"python.formatting.blackArgs": ["--line-length", "100"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ class Robot:
Author : Amaco
"""

population = 0

def __init__(self, name):
self.name = name
Robot.population += 1
Expand Down Expand Up @@ -50,4 +48,4 @@ def __call__(self):
print(droid1) # <__main__.Robot object at 0x7fde1c742110> -> R2-D2 robot!!


droid1()
droid1()
5 changes: 2 additions & 3 deletions 01 파이썬, 객체지향 프로그래밍/15-__slots__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
# __dict__를 통해 관리되는 객체의 성능을 최적화한다. -> 다수의 객체 생성시 메모리 사용 공간 대폭 감소한다.
"""

import timeit


class WithoutSlotClass:
def __init__(self, name, age):
Expand Down Expand Up @@ -34,9 +36,6 @@ def __init__(self, name, age):
print(ws.__slots__)


import timeit


# * 메모리 사용량 비교


Expand Down