summaryrefslogtreecommitdiffstats
path: root/documentation/ref-manual/eclipse/html/poky-ref-manual/migration-1.3-python-function-whitespace.html
blob: 7b7405984cece302b0f9fa7bfb8fa43b7cacc5d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<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>