---
title: "【python】零碎知识"
author: "Perrin Yong"
author_profile: https://www.pystone.net/profile/
published_by: "Perrin Yong"
canonical: https://www.pystone.net/notes/python-miscellaneous-tips/
type: note
content_role: unspecified
visibility: public
id_stability: rename-stable
source_path: "10-计算机、信息技术与工程/03-软件工程与质量保障/CI-CD与质量保障/CI-CD工具链/【python】零碎知识.md"
content_hash: d91fcf5df62040dd217cbf4c0cb5b1f73147bdcd9f3dcdc314a17bb635bce9d5
knowledge_version: 224c990773de.5fa8af6e39fa
site_commit: 224c990773de166d23a886306577dd90379529ce
notes_commit: 5fa8af6e39fa3891d1b9b4832bfa6c4e0ecaaf0a
---
# 【python】零碎知识

﻿# 【python】零碎知识

> 创建时间：2021/8/30 15:17

* foo, bar

## foo, bar

Used very generally as a **sample name for absolutely anything** , esp. programs and files (esp. scratch files).
First on the standard list of **metasyntactic variables** used in syntax examples (bar, baz, qux, quux, corge, grault, garply, waldo, fred, plugh, xyzzy, thud). [JARGON]

foo is used as a **place-holder** name, usually in example code to signify that the object being named, or the choice of name, is not part of the crux of the example. foo is often followed by bar, baz, and even bundy, if more than one such name is needed. Wikipedia calls these names Metasyntactic Variables. Python programmers supposedly use spam, eggs, ham, instead of foo, etc.

> I have also seen foo used when the programmer can't think of a meaningful name (as a substitute for tmp, say)

Ref: https://stackoverflow.com/questions/53609/what-does-foo-really-mean
