Path: csiph.com!usenet.pasdenom.info!news.etla.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.017 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'python.': 0.02; 'cc:addr :python-list': 0.11; 'python': 0.11; 'jan': 0.12; 'project,': 0.12; 'adam': 0.16; 'anyone?': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'i\xe2\x80\x99m': 0.16; 'ought': 0.16; 'all.': 0.16; 'wrote:': 0.18; 'hey': 0.18; 'app': 0.19; '(the': 0.22; 'cc:addr:python.org': 0.22; 'subject:Code': 0.24; 'fine': 0.24; 'cc:2**0': 0.24; 'post': 0.26; 'least': 0.26; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'converting': 0.30; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; 'python).': 0.31; 'another': 0.32; 'beginning': 0.33; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'really': 0.36; '14,': 0.36; '2.6': 0.36; 'that!': 0.36; 'doing': 0.36; 'subject:?': 0.36; 'should': 0.36; 'wrong': 0.37; 'too': 0.37; 'project': 0.37; 'list.': 0.37; 'stable': 0.38; 'that,': 0.38; 'sure': 0.39; 'how': 0.40; 'tell': 0.60; 'new': 0.61; 'matter': 0.61; "you're": 0.61; 'save': 0.62; "you'll": 0.62; 'chance': 0.65; 'relatively': 0.65; 'increase': 0.74; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type:content-transfer-encoding; bh=pBGHdDkvDZ3OEcWigQ/pNU4HX/9emilmbjMhB9u7dzg=; b=cM+ONuspsVCC/Tphb7d1On9FFi6lLWAO5VHcc+rkaX96RnAvqO8mTnEEJ9LplgUcY/ 4/g7Hbky3YY5lJQvua+ycl2G5rgO/vp3pDSbDAxqbQgrN7co/o2YiwR8AyngOkyn1P7a SItjmVW4xhsmqArj07mX6+82SPm67CPgE+N6fbi0QLymZLLF+xBgFv4jQxyROprf6UoV qJwHZRXw6C+kV7BhQol16OmNxrf4hSQNWa0Zd4FjeFamoBJ8OHNN/6p2ZXtTShtSDUwz RV6bgugYAid3XcNw3kRx1ugEpVr2w5gr3HnyPtIVXSGf+0Nzd444YocCblDFllKTzJJ+ qlyg== MIME-Version: 1.0 X-Received: by 10.68.108.194 with SMTP id hm2mr31030870pbb.22.1389631225928; Mon, 13 Jan 2014 08:40:25 -0800 (PST) In-Reply-To: <13BCC15D-B1E0-4AB2-9641-673D5B1B6FDD@gmail.com> References: <13BCC15D-B1E0-4AB2-9641-673D5B1B6FDD@gmail.com> Date: Tue, 14 Jan 2014 03:40:25 +1100 Subject: Re: Code review? From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 22 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1389631229 news.xs4all.nl 2841 [2001:888:2000:d::a6]:49290 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:63838 On Tue, Jan 14, 2014 at 3:29 AM, Adam wrote: > Hey all. New to the list. I=E2=80=99m working on a web app with 2.6 and= Flask. I=E2=80=99m still relatively new to python. Is there a chance to = get a code review from anyone? I really want someone to just tear up my co= de and tell me how to increase my efficiency and what I=E2=80=99m doing wro= ng (and how to upload images via a form in Flask, but that=E2=80=99s anothe= r story). > Definitely! Preferably, post your code in-line; if it's too long for that, post it someplace else and link to it. Be sure not to damage indentation, of course, but no matter how new you are to Python you'll know that! Incidentally, is there a reason you're using Python 2.6? You should be able to upgrade at least to 2.7, and Flask ought to work fine on 3.3 (the current stable Python). If it's the beginning of your project, and you have nothing binding you to Python 2, go with Python 3. Converting a small project now will save you the job of converting a big project in ten years' time :) ChrisA