YAMLでTabを使用し何度も失敗した話

2025年2月22日土曜日

ryuzu2048.github.io

What It YAML

YAML is a human-friendly data serialization

language for all programming languages. What It Is:

設定ファイルなどにも使われる

拡張子

主に

  • .yaml
  • .yml

但し、可能な限り .yaml 形式が推奨されている。

Is there an official extension for YAML files?

Please use “.yaml” when possible. FAQ

YAMLでTabを使用し何度も失敗した話

設定ファイルを読み込ませる際に何度もエラーが出た。

確認してみるとtabに関するエラーだった。

結論

  • Why does YAML forbid tabs?

Tabs have been outlawed since they are treated differently by different editors and tools. And since indentation is so critical to proper interpretation of YAML, this issue is just too tricky to even attempt. Indeed Guido van Rossum of Python has acknowledged that allowing TABs in Python source is a headache for many people and that were he to design Python again, he would forbid them.

FAQ

YAMLファイルでTabを使うのではなくSpaceを使う。

参考

このブログを検索

内部リンク集

外部リンク集

連絡フォーム

名前

メール *

メッセージ *

QooQ