30 lines
1.7 KiB
HTML
30 lines
1.7 KiB
HTML
<html>
|
||
<head>
|
||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||
<title>4.1.2.1. Python Function Whitespace</title>
|
||
<link rel="stylesheet" type="text/css" href="../book.css">
|
||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||
<link rel="home" href="index.html" title="The Yocto Project Reference Manual">
|
||
<link rel="up" href="1.3-recipes.html" title="4.1.2. Recipes">
|
||
<link rel="prev" href="1.3-recipes.html" title="4.1.2. Recipes">
|
||
<link rel="next" href="migration-1.3-proto=-in-src-uri.html" title="4.1.2.2. proto= in SRC_URI">
|
||
</head>
|
||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="section" title="4.1.2.1. Python Function Whitespace">
|
||
<div class="titlepage"><div><div><h4 class="title">
|
||
<a name="migration-1.3-python-function-whitespace"></a>4.1.2.1. Python Function Whitespace</h4></div></div></div>
|
||
<p>
|
||
All Python functions must now use four spaces for indentation.
|
||
Previously, an inconsistent mix of spaces and tabs existed,
|
||
which made extending these functions using
|
||
<code class="filename">_append</code> or <code class="filename">_prepend</code>
|
||
complicated given that Python treats whitespace as
|
||
syntactically significant.
|
||
If you are defining or extending any Python functions (e.g.
|
||
<code class="filename">populate_packages</code>, <code class="filename">do_unpack</code>,
|
||
<code class="filename">do_patch</code> and so forth) in custom recipes
|
||
or classes, you need to ensure you are using consistent
|
||
four-space indentation.
|
||
</p>
|
||
</div></body>
|
||
</html>
|