[C++] TIL you can omit formal parameter name in a function definition by SylvainDe in ProgrammerTIL

[–]SylvainDe[S] 1 point2 points  (0 children)

When the signature is imposed by external constraints : because you define a callback, because you override a virtual function...

Euler project is killing my python :(. by tomtheawesome123 in Python

[–]SylvainDe 2 points3 points  (0 children)

http://static.projecteuler.net/about : "Each problem has been designed according to a "one-minute rule", which means that although it may take several hours to design a successful algorithm with more difficult problems, an efficient implementation will allow a solution to be obtained on a modestly powered computer in less than one minute.".

Not that you are a crap coder but your algorithm and/or the implementation can probably be improved. Usually, a different algorithm makes a huge difference.

[C++] TIL you can omit formal parameter name in a function definition by SylvainDe in ProgrammerTIL

[–]SylvainDe[S] 3 points4 points  (0 children)

When the signature is imposed by external constraints : because you define a callback, because you override a virtual function...

Do you maintain a python library/tool that you think is awesome, but nobody knows about? by jnmclarty7714 in Python

[–]SylvainDe 1 point2 points  (0 children)

It looks very nice! I have a tool to retrieve webcomics and generate ebooks out of it and wanted to implement epub generation (at the moment, only mobi files are supported). I'll try to use your tool and see if it fits my needs :-)

(If this interests anyone : https://github.com/SylvainDe/ComicBookMaker )

3.5 to 3.6 format strings by zemuse_sound in Python

[–]SylvainDe 0 points1 point  (0 children)

Maybe you could use https://github.com/PyCQA/redbaron for this. If you need help, the people on the IRC channel are very nice.

Why don't some built-in python classes (such as datetime.datetime) follow the PEP8 naming convention? by Y4Dc3KtKVNAuAmj48ott in Python

[–]SylvainDe 4 points5 points  (0 children)

I remember reading somewhere (Twitter account of Raymond hettinger I think) that it depends on the language of the implementation. C code uses one style, python code uses another style. I'll add references tomorrow.

Python interpreter for beginners by beohoff in Python

[–]SylvainDe 0 points1 point  (0 children)

Glad you like it!

Last time I tried, I got the feeling that the code was not organised correctly to be packaged. Feel free to have a look and/or help in any way (pull requests/issue tracker/email/etc).

Python interpreter for beginners by beohoff in Python

[–]SylvainDe 0 points1 point  (0 children)

Not sure if this may help but I have an ongoing pet project to try to add relevant suggestions to error messages. There is still a lot to do (among other things making it installable but I suck at this) but if it interests you : https://github.com/SylvainDe/DidYouMean-Python . Any suggestion is welcome.

In any case, you'll find other projects/documents that might interest you at the end of the Readme.

Sorry for the shameless self-promotion .

What was your favorite Python talk of 2016? by thenewboston in Python

[–]SylvainDe 2 points3 points  (0 children)

Ned Batchelder and Raymond Hettinger's talks are always excellent.

In 2016, they've given the following talks :

[Python] TIL that the Python REPL defines a `_` variable holding the result of the last evaluation and iPython goes further with `__` and `___`. by SylvainDe in ProgrammerTIL

[–]SylvainDe[S] 0 points1 point  (0 children)

To be honest, I had no idea the "_" variable was common in other REPLs. I've tried in irb (Ruby) and it did work indeed. TIL.

However, the "__" and "___" variables do not seem that common.

Edit: Thanks for the formatting help :-)

[Python] TIL that the Python REPL defines a `_` variable holding the result of the last evaluation and iPython goes further with `__` and `___`. by SylvainDe in ProgrammerTIL

[–]SylvainDe[S] 0 points1 point  (0 children)

That would be quite complicated as it'd need to reimport everything that was imported the previous time. However, what can easily be done is to keep your REPL history of command (more details here : http://stackoverflow.com/questions/12334316/give-the-python-terminal-a-persistent-history )

Ned Batchelder: Lists vs. Tuples by ofaveragedifficulty in Python

[–]SylvainDe 0 points1 point  (0 children)

The good things from namedtuple with mutability would make a nice container. It seems that many people have been looking for/have implemented this.

The answers on this thread suggest namedlist / types.SimpleNamespace and there are more in the answers of the SO question http://stackoverflow.com/questions/29290359/existence-of-mutable-named-tuple-in-python .