There are some nice changes in here. You can mention to the students
that I really appreciated the work done on the menu loop. You took an
example of code that had grown piecemeal and become reasonably
unmaintainable, and refactored it to be very maintainable in the
future.
Good luck to all class
On Thu, Feb 16, 2017 at 6:34 AM, Dotan Cohen wrote:
> I think that we can help each other! This is my own code, back when I
> was writing Python like PHP:
> https://github.com/dotancohen/burton
Year, this is a good example code for me to do refactoring.
I created a pull request. This will be s
Makoto Kuwata writes:
> On Thu, Feb 16, 2017 at 6:53 AM, Erik wrote:
>>
>> (Python code examples of what you think is "bad" vs "good" would be
>> useful).
>
> You are right.
>
> Bad code Example:
>
> #
> https://codewords.recurse.com/issues/one/an-introduction-to-functional-programming
>
>
Thanks Erik,
On Thu, Feb 16, 2017 at 6:53 AM, Erik wrote:
> (which is what I think you mean by "proper size")
>
As I explained at my first post, I'm teaching Python to novice programmers.
Therefore refactoring example code should be in the size what they can
understand.
It is hard for them to
On Thu, 16 Feb 2017 12:00:36 +0100, Cecil Westerhof wrote:
> On Thursday 16 Feb 2017 10:43 CET, alister wrote:
>
>> On Wed, 15 Feb 2017 19:08:59 -0800, Paul Rubin wrote:
>>
>>> Antoon Pardon writes:
On reason to use this is for some easy "logging"
>>>
>>> I think it's better to use the actu
On Thursday 16 Feb 2017 10:43 CET, alister wrote:
> On Wed, 15 Feb 2017 19:08:59 -0800, Paul Rubin wrote:
>
>> Antoon Pardon writes:
>>> On reason to use this is for some easy "logging"
>>
>> I think it's better to use the actual logging module. I generally
>> start a new program with print state
On Wed, 15 Feb 2017 19:08:59 -0800, Paul Rubin wrote:
> Antoon Pardon writes:
>> On reason to use this is for some easy "logging"
>
> I think it's better to use the actual logging module. I generally start
> a new program with print statements but convert them to logging after
> there's enough
Antoon Pardon writes:
> On reason to use this is for some easy "logging"
I think it's better to use the actual logging module. I generally start
a new program with print statements but convert them to logging after
there's enough code to want to be more organized about it.
--
https://mail.pytho
On 15/02/17 21:53, Erik wrote:
process(data)
Before I get jumped on by a pack of rabid wolves, I of course meant:
process(d)
E.
--
https://mail.python.org/mailman/listinfo/python-list
Hi,
On 15/02/17 09:36, Makoto Kuwata wrote:
I'm sorry that my explanation is not enough.
I'm looking for bad python code, not refactoring examples.
I think you need to explain what you mean by "bad". Do you mean
something like:
i = 0
data = ["bad", "example", "of", "python", "code"]
while i
I think that we can help each other! This is my own code, back when I
was writing Python like PHP:
https://github.com/dotancohen/burton
It is badly in need of a Pythonic refactor! Have at it, and I'll be
happy to accept any pull requests.
On Wed, Feb 15, 2017 at 12:44 AM, Makoto Kuwata wrote:
>
On Wednesday, February 15, 2017 at 2:52:55 AM UTC-8, Antoon Pardon wrote:
> Op 15-02-17 om 07:28 schreef Steven D'Aprano:
> > E.g. http://code.activestate.com/recipes/580750
> >
> > does nothing more that define
> >
> > echo = sys.stdout.write
> >
> > Why not use sys.stdout.write directly? Or prin
On Thu, Feb 16, 2017 at 12:37 AM, Antoon Pardon
wrote:
>> But a better way, in my opinion, is to
>> use your editor to search for:
>>
>> print(
>>
>> and replace with:
>>
>> #print(
>
> You don't seem to understand, I don't want to disable all printing, only the
> diagnostics. That is easier to do
Op 15-02-17 om 13:24 schreef Steve D'Aprano:
> On Wed, 15 Feb 2017 09:49 pm, Antoon Pardon wrote:
>
>> Op 15-02-17 om 07:28 schreef Steven D'Aprano:
> [...]
>>> Why not use sys.stdout.write directly? Or print? If I saw somebody using
>>> this recipe in production code, in the way shown, I'd refacto
On Wed, 15 Feb 2017 09:49 pm, Antoon Pardon wrote:
> Op 15-02-17 om 07:28 schreef Steven D'Aprano:
[...]
>> Why not use sys.stdout.write directly? Or print? If I saw somebody using
>> this recipe in production code, in the way shown, I'd refactor it to just
>> use print. There's no advantage to re
2017-02-15 10:36 GMT+01:00 Makoto Kuwata :
> Thanks Irmen and Steven,
>
> I'm sorry that my explanation is not enough.
> I'm looking for bad python code, not refactoring examples.
> I can do (and want to do) refactor bad code by myself.
>
> Is there any bad python code (or project) with proper size
Op 15-02-17 om 07:28 schreef Steven D'Aprano:
> On Wed, 15 Feb 2017 07:44:03 +0900, Makoto Kuwata wrote:
>
>> Hi,
>>
>> Is there any *just right* python code to refactor?
>> In other words, I'm finding bad code example in python.
>
> Try looking at the ActiveState website for recipes in Python. Esp
Thanks Irmen and Steven,
I'm sorry that my explanation is not enough.
I'm looking for bad python code, not refactoring examples.
I can do (and want to do) refactor bad code by myself.
Is there any bad python code (or project) with proper size?
# I found a lot of bad PHP code in github, but didn'
On Wed, 15 Feb 2017 07:44:03 +0900, Makoto Kuwata wrote:
> Hi,
>
> Is there any *just right* python code to refactor?
> In other words, I'm finding bad code example in python.
Try looking at the ActiveState website for recipes in Python. Especially
look at the ones with negative ratings, but e
On 14-2-2017 23:44, Makoto Kuwata wrote:
> Hi,
>
> Is there any *just right* python code to refactor?
> In other words, I'm finding bad code example in python.
>
> (background)
> I'm teaching Python to some novice programmer, and
> want to show refactoring example to them.
>
> (required)
> * not
Hi,
Is there any *just right* python code to refactor?
In other words, I'm finding bad code example in python.
(background)
I'm teaching Python to some novice programmer, and
want to show refactoring example to them.
(required)
* not good code
* not too large (for novice programmer)
* not too co
21 matches
Mail list logo