2021-06-01 04:55:07 +00:00
|
|
|
#!astinterp
|
|
|
|
|
|
|
|
from __future__ import print_function
|
|
|
|
|
2021-08-04 06:17:20 +00:00
|
|
|
|
2021-06-01 04:55:07 +00:00
|
|
|
class Foo(object):
|
|
|
|
def bar(self):
|
|
|
|
return 1
|
|
|
|
|
|
|
|
@property
|
|
|
|
def baz(self):
|
|
|
|
print("'Computing' baz...")
|
|
|
|
return 2
|
|
|
|
|
|
|
|
|
|
|
|
a = Foo()
|
|
|
|
print(a.bar())
|
|
|
|
print(a.baz)
|
|
|
|
|
|
|
|
import random
|
2021-08-04 06:17:20 +00:00
|
|
|
|
|
|
|
|
2021-06-01 04:55:07 +00:00
|
|
|
for _ in range(10):
|
|
|
|
print(random.randint(0, 1024))
|
|
|
|
|
|
|
|
|
|
|
|
def bar(a, b, **bs):
|
|
|
|
pass
|
2021-06-01 05:46:43 +00:00
|
|
|
|
|
|
|
import requests
|
2021-08-04 06:17:20 +00:00
|
|
|
|
|
|
|
|
2021-06-01 05:46:43 +00:00
|
|
|
print(len(requests.get("https://pypi.org/pypi/requests/json").text))
|