Skip to content

Commit

Permalink
Merge pull request amamov#1 from amamov/book
Browse files Browse the repository at this point in the history
[refactoring]
  • Loading branch information
amamov authored and SeungVictor committed Feb 25, 2024
2 parents 586cadb + f28652d commit ee6b566
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 8 deletions.
20 changes: 18 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
{
"python.formatting.provider": "black",
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[markdown]": {
"editor.wordWrap": "on",
"editor.quickSuggestions": {
"comments": "off",
"strings": "off",
"other": "off"
},
"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"]
}
1 change: 1 addition & 0 deletions 01 파이썬, 객체지향 프로그래밍/00-decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ def new_func():
return new_func


#바로위에다가 함수를 재정의 decorator를 사용해서
@copyright
def smile():
print("🙃")
Expand Down
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

0 comments on commit ee6b566

Please sign in to comment.