Path: csiph.com!news.mixmin.net!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Thomas 'PointedEars' Lahn Newsgroups: comp.lang.python Subject: Re: Python Advanced Help Date: Tue, 15 Mar 2016 19:27:35 +0100 Organization: PointedEars Software (PES) Lines: 38 Message-ID: <9472462.AbmyeGU04E@PointedEars.de> References: Reply-To: Thomas 'PointedEars' Lahn Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8Bit X-Trace: solani.org 1458066456 10277 eJwFwQkBwDAIA0BLa3kCcgIU/xJ2Z+LHG+rmamsLcIJE+HTdlOhmmnxQySdX8Aqnt5jNqeEPJJkR9g== (15 Mar 2016 18:27:36 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Tue, 15 Mar 2016 18:27:36 +0000 (UTC) User-Agent: KNode/4.14.2 X-User-ID: eJwFwQkBwDAIA0BLpOGV01HwL2F3Rod3qJurre37EswrHJFY4y2oPCmdGDxrviPZ3agFhztBRMKP7pbl+QFB9xTR Cancel-Lock: sha1:JiZFWtxnBsK44X05S1VR/yMUb1M= X-NNTP-Posting-Host: eJwFwQkBwDAIA0BNPEmHHFiDfwm9Q9D4nySYWOxK8XlGVt+ZZYUZ6GNq58SoUZSQpTt17AEk0hFq Xref: csiph.com comp.lang.python:104950 Luke Charlton wrote: > Okay, So basically I created a python script around 1 year ago to grab an > explain_plan from a Greenplum system (Normal SQL) and change it around and > explain each step/section, the thing is, I've came back to the python code > and I don't understand anything of what it's doing (the code > specifically). OK, so, basically, RTFM and STFW. Also, you can print($object.__doc__) for each $object that you do not understand. > The Script does work but I just want to explain each section to myself and > understand it a bit more as I've forgot Python. This means putting > comments/notes in next to each section to explain it but hidden so it > doesn't show up when ran, so using the # commenting out #. It is sufficient for Python single-line comments if the line starts with “#” (optionally preceded by whitespace). Everything else is decoration. I use leading “##” and “###” to tell documentation comments (other than docstrings) from comment lines that disable code (lines starting with “#” only) before it is cleaned up. (WFM. There might be a PEP about this that recommends otherwise.) > […] > Code (Python) - http://pastebin.com/sVhW34fc (This is the one I'm trying > to understand) Before & After of an Explain_Plan in SQL Greenplum - > http://pastebin.com/81kNWVcy > > What we're aiming for (Teradatas Explain_Plan) - > http://pastebin.com/Nm4g12B3 -- PointedEars Twitter: @PointedEars2 Please do not cc me. / Bitte keine Kopien per E-Mail.