[Python-checkins] r55758 - sandbox/trunk/import_in_py/import_diagram.dot sandbox/trunk/import_in_py/import_diagram.svg

brett.cannon python-checkins at python.org
Tue Jun 5 04:05:39 CEST 2007


Author: brett.cannon
Date: Tue Jun  5 04:05:38 2007
New Revision: 55758

Removed:
   sandbox/trunk/import_in_py/import_diagram.dot
   sandbox/trunk/import_in_py/import_diagram.svg
Log:
Remove the attempt at diagramming import.  Pseudocode is easier to write and
read.


Deleted: /sandbox/trunk/import_in_py/import_diagram.dot
==============================================================================
--- /sandbox/trunk/import_in_py/import_diagram.dot	Tue Jun  5 04:05:38 2007
+++ (empty file)
@@ -1,72 +0,0 @@
-/* XXX For inputs to a function, can use dashed or dotted lines; that way solid
- * lines are just for control flow. */
-digraph Import {
-    compound=true;
-
-    /* Input. */
-    subgraph cluster_input {
-        label="Input";
-        color=blue;
-        node [shape=ellipse];
-
-        module_name [width=2];
-        globals [width=1.5];
-        locals [width=1.5];
-        fromlist [width=1.5];
-        level [width=1.5];
-    }
-
-    /* Output. */
-    subgraph cluster_output {
-        label="Output";
-        color=blue;
-        node [shape=ellipse];
-
-        return [width=1.5];
-        ImportError [width=2];
-    }
-
-    /* All work that occurs while the import lock is held. */
-    subgraph cluster_import_locking {
-        label="Import Lock Held";
-        color=blue;
-
-        /* Name resolution needed? */
-        if_name_resolution [shape=diamond,
-                            label="level != 0 and \n '__name__'",
-                            width=3, height=1.5];
-
-        /* Name resolution cluster. */
-        subgraph cluster_name_resolution {
-            label="Make name absolute";
-            color=blue;
-
-            pkg_level_adjust [shape=box,
-                    label="level - 1 \n if '__path__' \n else level",
-                    width=2, height=1];
-
-            test_depth [shape=diamond, label="Depth < level",
-                        width=2.5];
-
-            adjust_name [shape=box, label="Adjust name", width=1.75];
-
-            pkg_level_adjust -> test_depth;
-            test_depth -> ImportError [label="True"];
-            test_depth -> adjust_name [label="False"];
-        }
-        if_name_resolution -> pkg_level_adjust [label="True"];
-
-        /* Name is absolute. */
-        abs_module_name [shape=point, label="absolute \n module name"];
-
-        adjust_name -> abs_module_name;
-        if_name_resolution -> abs_module_name [label="False"];
-
-        abs_module_name -> return;
-    }
-
-    /* XXX until I decide how I want to handle the inputs. */
-    start [shape=point];
-    {module_name; globals; locals; fromlist; level} -> start;
-    start-> if_name_resolution;
-}

Deleted: /sandbox/trunk/import_in_py/import_diagram.svg
==============================================================================
--- /sandbox/trunk/import_in_py/import_diagram.svg	Tue Jun  5 04:05:38 2007
+++ (empty file)
@@ -1,137 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
- "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
-<!-- Generated by dot version 1.16 (Thu Mar 23 11:56:44 GMT 2006)
-     For user: (drifty) Brett   Title: Import    Pages: 1 -->
-<svg width="692pt" height="794pt"
- viewBox = "-1 -1 691 793"
- xmlns="http://www.w3.org/2000/svg">
-<g id="graph0" class="graph" style="font-family:Times-Roman;font-size:14.00;">
-<title>Import</title>
-<g id="graph2" class="cluster"><title>cluster_input</title>
-<polygon style="fill:none;stroke:blue;" points="13,88 677,88 677,12 13,12 13,88"/>
-<text text-anchor="middle" x="345" y="29">Input</text>
-</g>
-<g id="graph3" class="cluster"><title>cluster_output</title>
-<polygon style="fill:none;stroke:blue;" points="294,770 580,770 580,694 294,694 294,770"/>
-<text text-anchor="middle" x="437" y="711">Output</text>
-</g>
-<g id="graph4" class="cluster"><title>cluster_import_locking</title>
-<polygon style="fill:none;stroke:blue;" points="247,674 479,674 479,150 247,150 247,674"/>
-<text text-anchor="middle" x="363" y="167">Import Lock Held</text>
-</g>
-<g id="graph5" class="cluster"><title>cluster_name_resolution</title>
-<polygon style="fill:none;stroke:blue;" points="257,618 453,618 453,332 257,332 257,618"/>
-<text text-anchor="middle" x="355" y="349">Make name absolute</text>
-</g>
-<g id="node2" class="node"><title>module_name</title>
-<ellipse cx="93" cy="62" rx="72" ry="18" style="fill:none;stroke:black;"/>
-<text text-anchor="middle" x="93" y="67">module_name</text>
-</g>
-<g id="node24" class="node"><title>start</title>
-<ellipse cx="363" cy="120" rx="2" ry="2" style="fill:black;stroke:black;"/>
-</g>
-<g id="edge21" class="edge"><title>module_name&#45;&gt;start</title>
-<path style="fill:none;stroke:black;" d="M134,77C147,81 161,85 174,88 239,105 321,115 351,119"/>
-<polygon style="fill:black;stroke:black;" points="351,116 361,120 351,122 351,116"/>
-</g>
-<g id="node3" class="node"><title>globals</title>
-<ellipse cx="237" cy="62" rx="54" ry="18" style="fill:none;stroke:black;"/>
-<text text-anchor="middle" x="237" y="67">globals</text>
-</g>
-<g id="edge22" class="edge"><title>globals&#45;&gt;start</title>
-<path style="fill:none;stroke:black;" d="M269,77C296,89 334,106 352,115"/>
-<polygon style="fill:black;stroke:black;" points="353,112 361,119 350,118 353,112"/>
-</g>
-<g id="node4" class="node"><title>locals</title>
-<ellipse cx="363" cy="62" rx="54" ry="18" style="fill:none;stroke:black;"/>
-<text text-anchor="middle" x="363" y="67">locals</text>
-</g>
-<g id="edge23" class="edge"><title>locals&#45;&gt;start</title>
-<path style="fill:none;stroke:black;" d="M363,80C363,89 363,100 363,108"/>
-<polygon style="fill:black;stroke:black;" points="367,108 363,118 360,108 367,108"/>
-</g>
-<g id="node5" class="node"><title>fromlist</title>
-<ellipse cx="489" cy="62" rx="54" ry="18" style="fill:none;stroke:black;"/>
-<text text-anchor="middle" x="489" y="67">fromlist</text>
-</g>
-<g id="edge24" class="edge"><title>fromlist&#45;&gt;start</title>
-<path style="fill:none;stroke:black;" d="M457,77C430,89 392,106 374,115"/>
-<polygon style="fill:black;stroke:black;" points="376,118 365,119 373,112 376,118"/>
-</g>
-<g id="node6" class="node"><title>level</title>
-<ellipse cx="615" cy="62" rx="54" ry="18" style="fill:none;stroke:black;"/>
-<text text-anchor="middle" x="615" y="67">level</text>
-</g>
-<g id="edge25" class="edge"><title>level&#45;&gt;start</title>
-<path style="fill:none;stroke:black;" d="M583,77C573,81 562,85 552,88 487,107 406,116 375,119"/>
-<polygon style="fill:black;stroke:black;" points="375,122 365,120 375,116 375,122"/>
-</g>
-<g id="node8" class="node"><title>return</title>
-<ellipse cx="356" cy="744" rx="54" ry="18" style="fill:none;stroke:black;"/>
-<text text-anchor="middle" x="356" y="749">return</text>
-</g>
-<g id="node9" class="node"><title>ImportError</title>
-<ellipse cx="500" cy="744" rx="72" ry="18" style="fill:none;stroke:black;"/>
-<text text-anchor="middle" x="500" y="749">ImportError</text>
-</g>
-<g id="node11" class="node"><title>if_name_resolution</title>
-<polygon style="fill:none;stroke:black;" points="363,182 255,236 363,290 471,236 363,182"/>
-<text text-anchor="middle" x="363" y="233">level != 0 and </text>
-<text text-anchor="middle" x="363" y="249"> &#39;__name__&#39;</text>
-</g>
-<g id="node13" class="node"><title>pkg_level_adjust</title>
-<polygon style="fill:none;stroke:black;" points="429,364 285,364 285,436 429,436 429,364"/>
-<text text-anchor="middle" x="357" y="389">level &#45; 1 </text>
-<text text-anchor="middle" x="357" y="405"> if &#39;__path__&#39; </text>
-<text text-anchor="middle" x="357" y="421"> else level</text>
-</g>
-<g id="edge12" class="edge"><title>if_name_resolution&#45;&gt;pkg_level_adjust</title>
-<path style="fill:none;stroke:black;" d="M361,289C360,309 359,334 358,354"/>
-<polygon style="fill:black;stroke:black;" points="362,354 358,364 355,354 362,354"/>
-<text text-anchor="middle" x="359" y="321">True</text>
-</g>
-<g id="node20" class="node"><title>abs_module_name</title>
-<ellipse cx="356" cy="664" rx="2" ry="2" style="fill:black;stroke:black;"/>
-</g>
-<g id="edge16" class="edge"><title>if_name_resolution&#45;&gt;abs_module_name</title>
-<path style="fill:none;stroke:black;" d="M406,269C425,286 446,308 457,332 469,360 463,370 463,400 463,400 463,400 463,592 463,604 464,609 457,618 433,647 389,658 368,662"/>
-<polygon style="fill:black;stroke:black;" points="368,665 358,664 367,659 368,665"/>
-<text text-anchor="middle" x="464" y="503">False</text>
-</g>
-<g id="node14" class="node"><title>test_depth</title>
-<polygon style="fill:none;stroke:black;" points="355,475 265,498 355,521 445,498 355,475"/>
-<text text-anchor="middle" x="355" y="503">Depth &lt; level</text>
-</g>
-<g id="edge6" class="edge"><title>pkg_level_adjust&#45;&gt;test_depth</title>
-<path style="fill:none;stroke:black;" d="M356,436C356,445 356,455 356,465"/>
-<polygon style="fill:black;stroke:black;" points="360,465 356,475 353,465 360,465"/>
-</g>
-<g id="edge8" class="edge"><title>test_depth&#45;&gt;ImportError</title>
-<path style="fill:none;stroke:black;" d="M363,519C364,520 364,521 365,522 406,579 449,566 482,628 496,656 499,691 500,716"/>
-<polygon style="fill:black;stroke:black;" points="504,716 500,726 497,716 504,716"/>
-<text text-anchor="middle" x="487" y="641">True</text>
-</g>
-<g id="node15" class="node"><title>adjust_name</title>
-<polygon style="fill:none;stroke:black;" points="418,574 292,574 292,610 418,610 418,574"/>
-<text text-anchor="middle" x="355" y="597">Adjust name</text>
-</g>
-<g id="edge10" class="edge"><title>test_depth&#45;&gt;adjust_name</title>
-<path style="fill:none;stroke:black;" d="M355,522C355,535 355,550 355,564"/>
-<polygon style="fill:black;stroke:black;" points="359,564 355,574 352,564 359,564"/>
-<text text-anchor="middle" x="356" y="553">False</text>
-</g>
-<g id="edge14" class="edge"><title>adjust_name&#45;&gt;abs_module_name</title>
-<path style="fill:none;stroke:black;" d="M355,610C356,623 356,640 356,652"/>
-<polygon style="fill:black;stroke:black;" points="360,652 356,662 353,652 360,652"/>
-</g>
-<g id="edge18" class="edge"><title>abs_module_name&#45;&gt;return</title>
-<path style="fill:none;stroke:black;" d="M356,666C356,674 356,696 356,716"/>
-<polygon style="fill:black;stroke:black;" points="360,716 356,726 353,716 360,716"/>
-</g>
-<g id="edge27" class="edge"><title>start&#45;&gt;if_name_resolution</title>
-<path style="fill:none;stroke:black;" d="M363,122C363,128 363,149 363,172"/>
-<polygon style="fill:black;stroke:black;" points="367,172 363,182 360,172 367,172"/>
-</g>
-</g>
-</svg>


More information about the Python-checkins mailing list