[Chicago] Just sharing with everyone in the group.

Nick Timkovich prometheus235 at gmail.com
Tue Mar 3 21:36:16 CET 2015


Looking at your code, the biggest stylistic faux pas is the
"casting"--(int)(input)--you can wrap nearly anything in parenthesis (i.e.
a function call), but it's really strange.

I did a few passes through your code at lunch and went a bit overboard, but
here's a Gist that's maybe how I'd go about it
https://gist.github.com/nicktimko/39a41948cff170ae7d0b  Check the revisions
for some slightly more incremental changes and ask if you have any
questions.

Arguing Python 2 vs. Python 3 is pointless IMHO; Python 3 is the future and
there are fewer reasons to use 2 every day as old modules are updated. It
should be used by default for all new projects unless there is a concrete
reason at the outset why it won't work (e.g. you need to use Twisted).

On Tue, Mar 3, 2015 at 11:39 AM, Carl Karsten <carl at personnelware.com>
wrote:

> anytime this comes up I post this cuz it sums things up nicely.
>
> http://www.jwz.org/doc/tabs-vs-spaces.html
>
> On Tue, Mar 3, 2015 at 11:21 AM, sheila miguez <shekay at pobox.com> wrote:
>
>>
>> On Fri, Feb 27, 2015 at 5:57 PM, Lewit, Douglas <d-lewit at neiu.edu> wrote:
>>
>>> So I'm attaching my code.  Please be kind in your criticisms!  I know
>>
>>
>> I have a suggestion -- you might consider using gists or pastebins for
>> sharing code, for example.
>>
>> https://gist.github.com/
>> http://paste.ubuntu.com/
>>
>> I bet people have better suggestions than these.
>>
>> I do that sometimes when I want to share some one-off things. e.g. I was
>> talking to a co-maintainer of pyvideo about what I needed to do to use the
>> youtube api since we want to ditch vidscraper and I shared some sloppy
>> one-off code here https://gist.github.com/codersquid/8c1aa67f29c97ad0572f
>> it is not ready for prime time and definitely does not fit with what I'd
>> want to do to add it to our library.
>>
>>
>> --
>> shekay at pobox.com
>>
>> _______________________________________________
>> Chicago mailing list
>> Chicago at python.org
>> https://mail.python.org/mailman/listinfo/chicago
>>
>>
>
>
> --
> Carl K
>
>
> _______________________________________________
> Chicago mailing list
> Chicago at python.org
> https://mail.python.org/mailman/listinfo/chicago
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/chicago/attachments/20150303/d57bf816/attachment.html>


More information about the Chicago mailing list