Back to Basics Conceptsrequires clause Requirements with requires expression Concept (named requirements) // OK, uses 1st add() calling push_back() // OK, uses 2nd add() calling insert() Nico Josuttis C++ Concepts @cppcon coll.insert(val); } std::vectorcoll1; std::set coll2; add(coll1, 42); // OK, uses 1st add() calling push_back() add(coll2, 42); // OK, uses 2nd add() calling insert() C++20 C++20 add() calling insert() 2nd add() is used, because concept for 1st add() not satisfied Requirements not met => Concept not satisfied => 1st add() ignored Nico Josuttis C++ Concepts @cppcon 2024-09-18 0 码力 | 23 页 | 2.14 MB | 6 月前3
Python 标准库参考指南 3.6.15 datetime import datetime, timezone def file_mtime(path): t = datetime.fromtimestamp(os.stat(path).st_mtime, timezone.utc) return t.astimezone().isoformat() def main(): parser = argparse.ArgumentParser() 21 # day 16 # hour 30 # minute 0 # second 1 # weekday (0 = Monday) 325 # number of days since 1st January -1 # dst - method tzinfo.dst() returned None (下页继续) 8.1. datetime —基本的日期和时间类型 175 The Python stat().st_size 956 >>> p.stat().st_mtime 1327883547.852554 Path.chmod(mode) 改变文件的模式和权限,和os.chmod() 一样: >>> p = Path('setup.py') >>> p.stat().st_mode 33277 >>> p.chmod(0o444) >>> p.stat().st_mode 330600 码力 | 1886 页 | 8.95 MB | 9 月前3
Python 标准库参考指南 3.6.15 datetime import datetime, timezone def file_mtime(path): t = datetime.fromtimestamp(os.stat(path).st_mtime, timezone.utc) return t.astimezone().isoformat() def main(): parser = argparse.ArgumentParser() 21 # day 16 # hour 30 # minute 0 # second 1 # weekday (0 = Monday) 325 # number of days since 1st January -1 # dst - method tzinfo.dst() returned None (下页继续) 8.1. datetime —基本的日期和时间类型 175 The Python stat().st_size 956 >>> p.stat().st_mtime 1327883547.852554 Path.chmod(mode) 改变文件的模式和权限,和os.chmod() 一样: >>> p = Path('setup.py') >>> p.stat().st_mode 33277 >>> p.chmod(0o444) >>> p.stat().st_mode 330600 码力 | 1886 页 | 8.95 MB | 9 月前3
Python 标准库参考指南 3.7.13 datetime import datetime, timezone def file_mtime(path): t = datetime.fromtimestamp(os.stat(path).st_mtime, timezone.utc) return t.astimezone().isoformat() def main(): parser = argparse.ArgumentParser() 21 # day 16 # hour 30 # minute 0 # second 1 # weekday (0 = Monday) 325 # number of days since 1st January -1 # dst - method tzinfo.dst() returned None >>> # Date in ISO format >>> ic = dt.isocalendar() stat().st_size 956 >>> p.stat().st_mtime 1327883547.852554 Path.chmod(mode) 改变文件的模式和权限,和os.chmod() 一样: >>> p = Path('setup.py') >>> p.stat().st_mode 33277 >>> p.chmod(0o444) >>> p.stat().st_mode 330600 码力 | 1846 页 | 9.09 MB | 9 月前3
Python 标准库参考指南 3.7.13 datetime import datetime, timezone def file_mtime(path): t = datetime.fromtimestamp(os.stat(path).st_mtime, timezone.utc) return t.astimezone().isoformat() def main(): parser = argparse.ArgumentParser() 21 # day 16 # hour 30 # minute 0 # second 1 # weekday (0 = Monday) 325 # number of days since 1st January -1 # dst - method tzinfo.dst() returned None >>> # Date in ISO format >>> ic = dt.isocalendar() 对象,其中包含有关此路径的信息,例如os.stat()。结果会在每次调 用此方法时重新搜索。 >>> p = Path('setup.py') >>> p.stat().st_size 956 >>> p.stat().st_mtime 1327883547.852554 Path.chmod(mode) 改变文件的模式和权限,和os.chmod() 一样: 11.1. pathlib ---0 码力 | 1961 页 | 9.14 MB | 9 月前3
Python 标准库参考指南 2.7.18 these as arguments to the diff function fromdate = time.ctime(os.stat(fromfile).st_mtime) todate = time.ctime(os.stat(tofile).st_mtime) (下页继续) 112 Chapter 7. String Services The Python Library Reference 21 # day 16 # hour 30 # minute 0 # second 1 # weekday (0 = Monday) 325 # number of days since 1st January -1 # dst - method tzinfo.dst() returned None >>> # Date in ISO format >>> ic = dt.isocalendar() regular file''' for f in os.listdir(top): pathname = os.path.join(top, f) mode = os.stat(pathname).st_mode if S_ISDIR(mode): # It's a directory, recurse into it walktree(pathname, callback) elif S_ISREG(mode):0 码力 | 1552 页 | 7.42 MB | 9 月前3
Python 标准库参考指南 2.7.18 these as arguments to the diff function fromdate = time.ctime(os.stat(fromfile).st_mtime) todate = time.ctime(os.stat(tofile).st_mtime) (下页继续) 112 Chapter 7. String Services The Python Library Reference 21 # day 16 # hour 30 # minute 0 # second 1 # weekday (0 = Monday) 325 # number of days since 1st January -1 # dst - method tzinfo.dst() returned None >>> # Date in ISO format >>> ic = dt.isocalendar() regular file''' for f in os.listdir(top): pathname = os.path.join(top, f) mode = os.stat(pathname).st_mode if S_ISDIR(mode): # It's a directory, recurse into it walktree(pathname, callback) elif S_ISREG(mode):0 码力 | 1552 页 | 7.42 MB | 9 月前3
Python 标准库参考指南 2.7.18 these as arguments to the diff function fromdate = time.ctime(os.stat(fromfile).st_mtime) todate = time.ctime(os.stat(tofile).st_mtime) (下页继续) 112 Chapter 7. String Services The Python Library Reference 21 # day 16 # hour 30 # minute 0 # second 1 # weekday (0 = Monday) 325 # number of days since 1st January -1 # dst - method tzinfo.dst() returned None >>> # Date in ISO format >>> ic = dt.isocalendar() regular file''' for f in os.listdir(top): pathname = os.path.join(top, f) mode = os.stat(pathname).st_mode if S_ISDIR(mode): # It's a directory, recurse into it walktree(pathname, callback) elif S_ISREG(mode):0 码力 | 1552 页 | 7.42 MB | 9 月前3
Manus AI:Agent元年开启ÇYZ‰200[G\]¥,^E‰°_[G`a> • 2019 EbcCFW 3.0 µdeG÷øÕf$2°,67ËþæacCFWghXFPŸ R³Œjk Clm<ÑG]nopmqr>st2022E,FPŸ R<100'u#xÆS)÷ø,vw60+3C,ôK40[+cC%ã,xŸcCyz 7700[+FW{ã,|/5nFW}$~•> • L€Monica•‚,9€Œ"ƒ<„…Muv FINRA /¹º!"#/“Qj FINRA !"#/ØÛ*{_ fgßà*+áâŠ0Flã&¢)*+,„/01FäåŒST†Pæç&“•èéê;¶ë,ì(:/íî;ïð_¤¥01FSTKIçñ•?òv*Õ/QRv*ó/FôzÌõDbö÷øà&H[\³ùú“•è8Š‹û>v*ST_v* ÕÖ®ü!çñ×ýö÷Ìõ&K§¨þÿŒ‘’)*+áâ&“Ö—)*+˜Ò¶v*!"/#`”$_8%&;Õ‘’)*+ Œ/;VW01_fgÞjij@AbST_*+,jWYÕU=ÚË/kz_fg/*\lþmnF ×omnDbNav*yzmnœµpqÒ¶·)*+q/@A;ST“`¸/v*!"_v*ÕÖ®çñ•fgb/;NÙ•>ÜœµÄHJK)*+01Š0¦/rHP2st_v*Õuvi)*+—˜v*;Na!÷/#`Ÿw%&_j•¤e4 /QRcduæx)*+ym_ )*+K:@z<{F<-|H®4-.;sl}~|“• 0 码力 | 23 页 | 4.87 MB | 5 月前3
Python 标准库参考指南 3.8.20 datetime import datetime, timezone def file_mtime(path): t = datetime.fromtimestamp(os.stat(path).st_mtime, timezone.utc) return t.astimezone().isoformat() def main(): parser = argparse.ArgumentParser() 21 # day 16 # hour 30 # minute 0 # second 1 # weekday (0 = Monday) 325 # number of days since 1st January -1 # dst - method tzinfo.dst() returned None >>> # Date in ISO format >>> ic = dt.isocalendar() 对象,其中包含有关此路径的信息,例如os.stat()。结果会在每次 调用此方法时重新搜索。 >>> p = Path('setup.py') >>> p.stat().st_size 956 >>> p.stat().st_mtime 1327883547.852554 Path.chmod(mode) 改变文件的模式和权限,和os.chmod() 一样: 352 Chapter 11.0 码力 | 1927 页 | 9.69 MB | 9 月前3
共 133 条
- 1
- 2
- 3
- 4
- 5
- 6
- 14













