Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #109806

Re: i'm a python newbie & wrote my first script, can someone critique it?

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Marc Brooks <marcwbrooks@gmail.com>
Newsgroups comp.lang.python
Subject Re: i'm a python newbie & wrote my first script, can someone critique it?
Date Fri, 10 Jun 2016 20:51:01 -0400
Lines 30
Message-ID <mailman.146.1465606265.2306.python-list@python.org> (permalink)
References <d7259e19-2c36-4282-9f57-bc46a6d5d641@googlegroups.com> <C25AE7F9-D6BD-46EE-90E2-21072856BA58@icloud.com> <CAN+KW4qQk7WUTk5cVpVeS9cyQqx6q10u3KxhTgAMcNSipxJUuw@mail.gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
X-Trace news.uni-berlin.de SwNuECKdOUBT+sNM2gdp5QR2zFYopJBzOFsGulWUMTYw==
Return-Path <marcwbrooks@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.003
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'python,': 0.02; 'cc:addr :python-list': 0.09; 'subject:script': 0.09; 'received:209.85.218': 0.10; 'python': 0.10; 'subject:python': 0.14; '2016': 0.16; 'basic.': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'scientist': 0.16; 'url:pep-0008': 0.16; 'wrote:': 0.16; '&gt;': 0.18; 'email addr:gmail.com&gt;': 0.18; 'cc:addr:python.org': 0.20; 'cc:2**1': 0.22; 'cc:no real name:2**0': 0.22; 'cc:addr:gmail.com': 0.24; 'header:In-Reply- To:1': 0.24; 'wondering': 0.25; 'chris': 0.26; 'fri,': 0.27; 'message-id:@mail.gmail.com': 0.27; 'cap': 0.29; 'marc': 0.29; 'pep': 0.29; 'url:peps': 0.29; 'comments': 0.30; 'url:mailman': 0.30; 'work.': 0.30; 'code': 0.30; "i'd": 0.31; 'url:python': 0.33; 'done,': 0.33; 'lock': 0.33; 'url:listinfo': 0.34; 'structure': 0.34; 'received:google.com': 0.35; 'could': 0.35; 'url:dev': 0.35; 'but': 0.36; 'url:org': 0.36; 'received:209.85': 0.36; 'subject:?': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'really': 0.37; 'things': 0.38; 'received:209': 0.38; 'delete': 0.38; 'url:mail': 0.40; 'your': 0.60; 'iphone': 0.63; 'better.': 0.66; 'subject: & ': 0.74
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Nuffd8tgRszXEJ8O1ylOB8BvhU7u6cEVyggrdEbjLK8=; b=qRgB7G9k1SyCpwad1JC2l7DCkPiD+Wc0kDYiQ+nwe2QGl4z2U7wbTj7wFDSA08KOal 0LBM1wyKNHftpxBI1oYRuWFFb5VqnSyvB8eCN3zw3iII6SN0uuRA5DfesXByK7wsPqDm hfrRgBb0cwkkZSafUlYXoFQZ0lIBoXLHRj8mJWaCL3YcKWXDz3MaOuJecU4zSULXLM7Z oDt1oMinnOkWF28bwqwaFl579gKXUOSFOTNAHPO33kQWKQOLj/uatIbaBwptvN29LpNb ZLiK4vb/eDEmHKDxCGYmw+ZRjVariPad2Fw9sgpSjouFtqW+5xzj+0b/K86GP43tonyA 7W/Q==
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Nuffd8tgRszXEJ8O1ylOB8BvhU7u6cEVyggrdEbjLK8=; b=Va5Z409YlVwh1iiIEFMXK1fD0BuCDkfUIKMtlKmWgLCGHdFOp5mYRZ/P4lgxsJwKFn hhdSEaCC2bLn5NYTg6faFA4bP3CNyij9wrU5paOwNRASQjRhv5ZSOdHZKiQWKrrlMyBk olKQ7HjfUys5Nc/NQu07Bsne+WZUNdXUUvRaQYBb0F/HCwBrUIrBrJUvP/fqT1GyGmPw c8jQQVMMdTFJmJNPkhMdzwikkpUVDWQqOlSPFnE8ZMrbBAopR8Fnxrjp9iaJtoMMy3CT HXWP1ZlPS29OqRGYMeVGNTRTNYd3mqJFACaGvu5Wvh2fuTAs1cKenidW18vjIOnP7lXo MrPw==
X-Gm-Message-State ALyK8tIyxTezAaP11HBA8dGZoXclED0nR+TCCpL/RCDE+yDUR8a+Tib0V352/UWme6YVtdnJro30PghfsvplQA==
X-Received by 10.202.80.85 with SMTP id e82mr2046432oib.47.1465606262292; Fri, 10 Jun 2016 17:51:02 -0700 (PDT)
In-Reply-To <C25AE7F9-D6BD-46EE-90E2-21072856BA58@icloud.com>
X-Content-Filtered-By Mailman/MimeDel 2.1.22
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.22
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID <CAN+KW4qQk7WUTk5cVpVeS9cyQqx6q10u3KxhTgAMcNSipxJUuw@mail.gmail.com>
X-Mailman-Original-References <d7259e19-2c36-4282-9f57-bc46a6d5d641@googlegroups.com> <C25AE7F9-D6BD-46EE-90E2-21072856BA58@icloud.com>
Xref csiph.com comp.lang.python:109806

Show key headers only | View raw


The structure of your program is really not that Pythonic.  I'd recommend
you take a look at PEP 8.

https://www.python.org/dev/peps/pep-0008/

It's not perfect, but it's a good start to get a feel for how to structure
your Python work.

Marc

On Fri, Jun 10, 2016 at 7:05 PM, Christopher Reimer <
christopher_reimer@icloud.com> wrote:

>
>
> Sent from my iPhone
>
> > On Jun 10, 2016, at 3:52 PM, mad scientist jr <
> mad.scientist.jr@gmail.com> wrote:
> > .
> > Now that it's done, I am wondering what kind of things I could do better.
>
> This is Python, not BASIC. Lay off on the CAP LOCK key and delete all the
> comments and separation blocks. No one is going to find your code in all
> that noise.
>
> Chris R.
> --
> https://mail.python.org/mailman/listinfo/python-list
>

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

i'm a python newbie & wrote my first script, can someone critique it? mad scientist jr <mad.scientist.jr@gmail.com> - 2016-06-10 15:52 -0700
  Re: i'm a python newbie & wrote my first script, can someone critique it? Christopher Reimer <christopher_reimer@icloud.com> - 2016-06-10 16:05 -0700
  Re: i'm a python newbie & wrote my first script, can someone critique it? Marc Brooks <marcwbrooks@gmail.com> - 2016-06-10 20:51 -0400
  Re: i'm a python newbie & wrote my first script, can someone critique it? Joel Goldstick <joel.goldstick@gmail.com> - 2016-06-10 21:02 -0400
  Re: i'm a python newbie & wrote my first script, can someone critique it? Larry Hudson <orgnut@yahoo.com> - 2016-06-10 21:00 -0700
  Re: i'm a python newbie & wrote my first script, can someone critique it? Matt Wheeler <m@funkyhat.org> - 2016-06-11 04:28 +0000
    Re: i'm a python newbie & wrote my first script, can someone critique it? mad scientist jr <mad.scientist.jr@gmail.com> - 2016-06-11 10:59 -0700
      Re: i'm a python newbie & wrote my first script, can someone critique it? mad scientist jr <mad.scientist.jr@gmail.com> - 2016-06-11 11:14 -0700
        Re: i'm a python newbie & wrote my first script, can someone critique it? Marc Brooks <marcwbrooks@gmail.com> - 2016-06-11 18:18 +0000
      Re: i'm a python newbie & wrote my first script, can someone critique it? MRAB <python@mrabarnett.plus.com> - 2016-06-11 19:41 +0100
        Re: i'm a python newbie & wrote my first script, can someone critique it? mad scientist jr <mad.scientist.jr@gmail.com> - 2016-06-12 09:04 -0700

csiph-web