PYTHON_TASKS Telegram 2769
Что выведет код?
def f(name="", value=0):
import sys
func_name = sys._getframe(0).f_code.co_name
func = sys._getframe(1).f_locals[func_name]
setattr(func, name, value)
return sum(func.__dict__.values())

print(f("x", 1), f("y", 2), f())



tgoop.com/python_tasks/2769
Create:
Last Update:

Что выведет код?

def f(name="", value=0):
import sys
func_name = sys._getframe(0).f_code.co_name
func = sys._getframe(1).f_locals[func_name]
setattr(func, name, value)
return sum(func.__dict__.values())

print(f("x", 1), f("y", 2), f())

BY Python Tasks & ML | Задачи по питону и машинному обучению


Share with your friend now:
tgoop.com/python_tasks/2769

View MORE
Open in Telegram


Telegram News

Date: |

With Bitcoin down 30% in the past week, some crypto traders have taken to Telegram to “voice” their feelings. The optimal dimension of the avatar on Telegram is 512px by 512px, and it’s recommended to use PNG format to deliver an unpixelated avatar. A new window will come up. Enter your channel name and bio. (See the character limits above.) Click “Create.” The main design elements of your Telegram channel include a name, bio (brief description), and avatar. Your bio should be: The best encrypted messaging apps
from us


Telegram Python Tasks & ML | Задачи по питону и машинному обучению
FROM American