{"provider_name":"Hatena Blog","width":"100%","url":"https://qtatsu.hatenablog.com/entry/2021/03/19/004152","author_name":"Qtatsu","blog_url":"https://qtatsu.hatenablog.com/","provider_url":"https://hatena.blog","blog_title":"qtatsu\u306e\u9031\u5831","description":"\u524d\u66f8\u304d \u53c2\u8003\u30ea\u30f3\u30af \u74b0\u5883 f-string\u306e\u4f8b\u3068\u7528\u8a9e f-string\u3067\u4f7f\u3046\u7528\u8a9e\u306e\u307e\u3068\u3081 \u6700\u5f37\u30b3\u30de\u30f3\u30c9: help('FORMATTING') \u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306e\u4ed5\u7d44\u307f\u3092\u8003\u3048\u308b conversion\u30d5\u30a3\u30fc\u30eb\u30c9\u306f\u7279\u6b8a\u30e1\u30bd\u30c3\u30c9__str__\u306a\u3069\u3092\u547c\u3076. f-string\u306e\u7f6e\u63db\u30d5\u30a3\u30fc\u30eb\u30c9\u4e2d\u3067\u306f\u3001__format__()\u30e1\u30bd\u30c3\u30c9\u304c\u547c\u3070\u308c\u308b\u3002 \u66f8\u5f0f\u6307\u5b9a\u6587\u5b57\u5217(format_spec)\u306e\u89e3\u91c8\u306f\u5bfe\u8c61\u306e\u30af\u30e9\u30b9\u6b21\u7b2c\u3067\u3042\u308b\u3002 datetime.datetime\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306f\u7279\u6b8a\u306a\u66f8\u5f0f\u6307\u5b9a\u6587\u5b57\u5217\u3092\u6301\u3064 \u30c7\u30d5\u30a9\u30eb\u30c8\u306e__format__()\u306fobject\u306b\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308b \u518d\u78ba\u8a8d: conversion(!r)\u306f__for\u2026","title":"\u3010Python\u3011f-string\u3068\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306e\u4ed5\u7d44\u307f\u3092\u7279\u6b8a\u30e1\u30bd\u30c3\u30c9__format__\u304b\u3089\u7406\u89e3\u3059\u308b\u3002","height":"190","categories":["Python","\u6280\u8853"],"type":"rich","author_url":"https://blog.hatena.ne.jp/Qtatsu/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fqtatsu.hatenablog.com%2Fentry%2F2021%2F03%2F19%2F004152\" title=\"\u3010Python\u3011f-string\u3068\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306e\u4ed5\u7d44\u307f\u3092\u7279\u6b8a\u30e1\u30bd\u30c3\u30c9__format__\u304b\u3089\u7406\u89e3\u3059\u308b\u3002 - qtatsu\u306e\u9031\u5831\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","published":"2021-03-19 00:41:52","version":"1.0","image_url":null}