peps: PEP 495: Added a sketch illustrating a 'fold'.
https://hg.python.org/peps/rev/394cc877bc89 changeset: 6019:394cc877bc89 user: Alexander Belopolsky <alexander.belopolsky@gmail.com> date: Sun Aug 30 21:40:19 2015 -0400 summary: PEP 495: Added a sketch illustrating a 'fold'. files: pep-0495-fold.svg | 418 ++++++++++++++++++++++++++++++++++ pep-0495.txt | 5 + 2 files changed, 423 insertions(+), 0 deletions(-) diff --git a/pep-0495-fold.svg b/pep-0495-fold.svg new file mode 100644 --- /dev/null +++ b/pep-0495-fold.svg @@ -0,0 +1,418 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="150mm" + height="140mm" + viewBox="0 0 531.49606 496.06299" + id="svg14800" + version="1.1" + inkscape:version="0.91 r13725" + sodipodi:docname="pep-0495-fold.svg"> + <defs + id="defs14802"> + <marker + inkscape:stockid="DotM" + orient="auto" + refY="0" + refX="0" + id="DotM" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path6980" + d="m -2.5,-1 c 0,2.76 -2.24,5 -5,5 -2.76,0 -5,-2.24 -5,-5 0,-2.76 2.24,-5 5,-5 2.76,0 5,2.24 5,5 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(0.4,0,0,0.4,2.96,0.4)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="DiamondSstart" + orient="auto" + refY="0" + refX="0" + id="DiamondSstart" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path7010" + d="M 0,-7.0710768 -7.0710894,0 0,7.0710589 7.0710462,0 0,-7.0710768 Z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(0.2,0,0,0.2,1.2,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow2Mend" + orient="auto" + refY="0" + refX="0" + id="Arrow2Mend" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path6943" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1" + d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z" + transform="scale(-0.6,-0.6)" + inkscape:connector-curvature="0" /> + </marker> + <pattern + inkscape:collect="always" + xlink:href="#pattern15623" + id="pattern15646" + patternTransform="translate(0,2.8515625e-5)" /> + <pattern + inkscape:collect="always" + xlink:href="#Strips1_1" + id="pattern15599" + patternTransform="matrix(10,0,0,10,424.80508,-468.3217)" /> + <pattern + inkscape:isstock="true" + inkscape:stockid="Stripes 1:1" + id="Strips1_1" + patternTransform="translate(0,0) scale(10,10)" + height="1" + width="2" + patternUnits="userSpaceOnUse" + inkscape:collect="always"> + <rect + id="rect6108" + height="2" + width="1" + y="-0.5" + x="0" + style="fill:black;stroke:none" /> + </pattern> + <marker + inkscape:stockid="Arrow1Lstart" + orient="auto" + refY="0" + refX="0" + id="Arrow1Lstart" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path6916" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 Z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(0.8,0,0,0.8,10,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="Arrow1Lend" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path6919" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 Z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Mend" + orient="auto" + refY="0" + refX="0" + id="Arrow1Mend" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path6925" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 Z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.4,0,0,-0.4,-4,0)" + inkscape:connector-curvature="0" /> + </marker> + <pattern + patternUnits="userSpaceOnUse" + width="265.19116" + height="51.983494" + patternTransform="translate(-424.80508,468.3217)" + id="pattern15596"> + <path + inkscape:connector-curvature="0" + id="path15588" + d="m 0.376692,25.991752 0,-25.61506 132.218888,0 132.21889,0 0,25.61506 0,25.61505 -132.21889,0 -132.218888,0 0,-25.61505 z" + style="opacity:0.5;fill:url(#pattern15599);fill-opacity:1;stroke:#ffd640;stroke-width:0.75338399;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:0.75338398, 0.75338398;stroke-dashoffset:0;stroke-opacity:1" /> + </pattern> + <pattern + patternUnits="userSpaceOnUse" + width="213.59843" + height="36.4331" + patternTransform="translate(-0.5,1122.7283)" + id="pattern15623"> + <path + inkscape:connector-curvature="0" + id="path15613" + d="m 0.5,0.5 212.59843,0 0,17.7166 -212.59843,0 z" + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:10;stroke-opacity:1" /> + <path + inkscape:connector-curvature="0" + id="path15615" + d="m 0.5,18.2166 0,17.7165 212.59843,0 0,-17.7165" + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:10;stroke-opacity:1" /> + <path + inkscape:connector-curvature="0" + id="path15617" + d="m 0.98017929,9.3247 0,-7.9105 105.47376071,0 105.47375,0 0,7.9105 0,7.9105 -105.47375,0 -105.47376071,0 0,-7.9105 z" + style="opacity:0.5;fill:#ffd744;fill-opacity:1;stroke:#ffd744;stroke-width:0.75338399;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:7.5338397;stroke-opacity:0.50196078" /> + <path + inkscape:connector-curvature="0" + id="path15621" + d="m 0.98017929,27.0292 0,-8.2872 105.47376071,0 105.47375,0 0,8.2872 0,8.2872 -105.47375,0 -105.47376071,0 0,-8.2872 z" + style="opacity:0.5;fill:#326c9c;fill-opacity:1;stroke:#326c9b;stroke-width:0.75338399;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:7.5338397;stroke-opacity:0.50196078" /> + </pattern> + <pattern + patternUnits="userSpaceOnUse" + width="213.59843" + height="36.433102" + patternTransform="translate(-0.5,1122.7283)" + id="pattern15643"> + <rect + id="rect15629" + y="0" + x="0" + height="36.433102" + width="213.59843" + style="fill:url(#pattern15646);stroke:none" /> + </pattern> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="1.4142136" + inkscape:cx="94.546007" + inkscape:cy="200.6291" + inkscape:document-units="mm" + inkscape:current-layer="layer1" + showgrid="true" + inkscape:window-width="2556" + inkscape:window-height="1555" + inkscape:window-x="30" + inkscape:window-y="0" + inkscape:window-maximized="0" + objecttolerance="10000" + showborder="false" + fit-margin-top="0" + fit-margin-left="0" + fit-margin-right="0" + fit-margin-bottom="0"> + <inkscape:grid + type="xygrid" + id="grid14808" + originx="37.568003" + spacingx="17.716536" + spacingy="17.716536" + empspacing="3" + originy="-71.39131" /> + </sodipodi:namedview> + <metadata + id="metadata14805"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(37.568003,-484.90789)"> + <path + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.99921262;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#Arrow1Lstart);marker-end:url(#Arrow1Lend)" + d="M 476.5503,945.88825 0,946.42873 0,521.76422" + id="path14810" + inkscape:connector-curvature="0" + sodipodi:nodetypes="ccc" /> + <flowRoot + xml:space="preserve" + id="flowRoot15458" + style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"><flowRegion + id="flowRegion15460"><rect + id="rect15462" + width="159.44882" + height="106.29922" + x="-425.19687" + y="946.06299" /></flowRegion><flowPara + id="flowPara15464"></flowPara></flowRoot> <flowRoot + xml:space="preserve" + id="flowRoot15466" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:40px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"><flowRegion + id="flowRegion15468"><rect + id="rect15470" + width="159.44882" + height="88.58268" + x="212.59843" + y="1070.0787" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:40px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:center;writing-mode:lr-tb;text-anchor:middle" /></flowRegion><flowPara + id="flowPara15474"></flowPara></flowRoot> <flowRoot + xml:space="preserve" + id="flowRoot15480" + style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"><flowRegion + id="flowRegion15482"><rect + id="rect15484" + width="70.866142" + height="53.149609" + x="212.59843" + y="1105.5118" /></flowRegion><flowPara + id="flowPara15486"></flowPara></flowRoot> <flowRoot + xml:space="preserve" + id="flowRoot15488" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:22.5px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + transform="translate(270.90867,-112.71393)"><flowRegion + id="flowRegion15490"><rect + id="rect15492" + width="265.74805" + height="88.58268" + x="159.44882" + y="1070.0787" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:22.5px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:start;writing-mode:lr-tb;text-anchor:start" /></flowRegion><flowPara + id="flowPara15496">UTC</flowPara></flowRoot> <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:22.5px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + x="-570.61304" + y="-20.473276" + id="text15498" + sodipodi:linespacing="125%" + transform="matrix(0,-1,1,0,0,0)"><tspan + sodipodi:role="line" + id="tspan15500" + x="-570.61304" + y="-20.473276">local</tspan></text> + <path + style="fill:none;fill-rule:evenodd;stroke:#336d9c;stroke-width:2.12598419;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 52.152923,893.91006 266.74473,679.31828" + id="path15502" + inkscape:connector-curvature="0" /> + <path + style="fill:none;fill-rule:evenodd;stroke:#336d9c;stroke-width:2.12598419;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 265.74804,733.46456 425.19686,574.01574" + id="path15504" + inkscape:connector-curvature="0" /> + <path + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1, 12;stroke-dashoffset:0;stroke-opacity:1" + d="m 0,733.46456 265.74804,0 0,211.88321" + id="path15552" + inkscape:connector-curvature="0" + sodipodi:nodetypes="ccc" /> + <path + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.99921262;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.9992126, 11.99055118;stroke-dashoffset:0;stroke-opacity:1" + d="m 0,680.31496 318.89765,0 0,265.57329" + id="path15566" + inkscape:connector-curvature="0" + sodipodi:nodetypes="ccc" /> + <path + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.99921262;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.99921262, 7.99370098;stroke-dashoffset:0;stroke-opacity:1" + d="m 212.59843,733.46456 0,212.42369" + id="path15676" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <path + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1, 12;stroke-dashoffset:0;stroke-opacity:1" + d="m 265.74804,680.31496 0,53.1496" + id="path15678" + inkscape:connector-curvature="0" /> + <path + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:6, 2;stroke-dashoffset:0;stroke-opacity:1" + d="m 0,698.03149 248.0315,0 0,247.85676" + id="path15680" + inkscape:connector-curvature="0" + sodipodi:nodetypes="ccc" /> + <path + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:4, 2;stroke-dashoffset:0;stroke-opacity:1" + d="m 248.0315,698.03149 53.14961,0 0,247.85676" + id="path15682" + inkscape:connector-curvature="0" + sodipodi:nodetypes="ccc" /> + <text + xml:space="preserve" + style="font-style:italic;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Italic';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + x="-17.04035" + y="703.841" + id="text16422" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan16424" + x="-17.04035" + y="703.841">t</tspan></text> + <text + xml:space="preserve" + style="font-style:italic;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Italic';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + x="240.81497" + y="962.27954" + id="text16438" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan16440" + x="240.81497" + y="962.27954">u<tspan + style="font-size:64.99999762%;baseline-shift:sub" + id="tspan16442">0</tspan></tspan></text> + <text + xml:space="preserve" + style="font-style:italic;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Italic';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + x="294.96457" + y="963.77954" + id="text16444" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan16446" + x="294.96457" + y="963.77954">u<tspan + style="font-size:64.99999762%;baseline-shift:sub" + id="tspan16448">1</tspan></tspan></text> + <path + style="fill:none;fill-rule:evenodd;stroke:#336d9c;stroke-width:2.12598419;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 212.59843,946.06299 53.14961,0" + id="path16450" + inkscape:connector-curvature="0" /> + <path + style="fill:none;fill-rule:evenodd;stroke:#336d9c;stroke-width:2.12598419;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 0,733.46456 0,-53.1496" + id="path16452" + inkscape:connector-curvature="0" /> + <path + style="fill:none;fill-rule:evenodd;stroke:#ffd847;stroke-width:2.12598419;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 265.74804,946.06299 53.14961,0" + id="path16454" + inkscape:connector-curvature="0" /> + <path + style="fill:none;fill-rule:evenodd;stroke:#ffd847;stroke-width:2.12598419;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 2.216536,733.46456 0,-53.1496" + id="path16456" + inkscape:connector-curvature="0" /> + <text + xml:space="preserve" + style="font-style:italic;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Bold Italic';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + x="343.96481" + y="712.6087" + id="text16458" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan16460" + x="343.96481" + y="712.6087">Fold</tspan></text> + </g> +</svg> diff --git a/pep-0495.txt b/pep-0495.txt --- a/pep-0495.txt +++ b/pep-0495.txt @@ -93,6 +93,11 @@ this PEP specifies how various functions should behave when given an invalid instance. +.. image:: pep-0495-fold.svg + :align: center + :width: 60% + + Affected APIs ------------- -- Repository URL: https://hg.python.org/peps
participants (1)
-
alexander.belopolsky