print(dir(node.left))
> if isinstance(node.op, ast.Add):
> node.op = op2(node.left, node.right)
> return node
>
> code = inspect.getsourcelines(solve)
> tree = ast.parse(code)
> tree = ChangeAddToMultiply().visit(tree)
> ast.fix_missing_lo
unction from float to int in from_strings
>
>
> Not to mention that each parameter is named seven times.
>
>
> How can I improve this code to reduce the number of times I have to repeat
> myself?
>
>
>
>
>
> --
> Steve
> “Cheer up,” they said, “things could be worse.” So I cheered up, and sure
> enough, things got worse.
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
--
Yann Kaiser
kaiser.y...@gmail.com
yann.kai...@efrei.net
+33 6 51 64 01 89
https://github.com/epsy
--
https://mail.python.org/mailman/listinfo/python-list
he documentation as doctrings can be difficult, at
> times
>
> noweb is considerably simpler - but does not allow for the extraction
> of docstrings/comments - and does provide for a fairly painless way to
> combine comments, documentation along with code
> --
> https://mail
if online is ok.
> --
> https://mail.python.org/mailman/listinfo/python-list
>
--
Yann Kaiser
kaiser.y...@gmail.com
yann.kai...@efrei.net
+33 6 51 64 01 89
https://github.com/epsy
--
https://mail.python.org/mailman/listinfo/python-list
urn
> a B object:
>
> class B(A):
> ...
> def f1(self, <...>):
> ...
> res=f(<...>)
>
> How do I return res as a B object?
>
> Thanks.
> --
> https://mail.python.org/mailman/listinfo/python-list
>
--
Yann Kaiser
kaiser.y...@gm
Apparently the thread poster cannot receive email, I just received a bounce
on my previous email :-/
On Thu, Jan 21, 2016, 08:49 Yann Kaiser wrote:
> partial treats keyword arguments as default values, though they become
> keyword-only as a result :
>
> f1 = functools.partial(g, p=
You can use the // operator, which should do what you want.
On Thu, Jan 21, 2016, 09:40 Shiyao Ma wrote:
> Hi,
>
> I wanna simulate C style integer division in Python3.
>
> So far what I've got is:
> # a, b = 3, 4
>
> import math
> result = float(a) / b
> if result > 0:
> result = math.floor(r
partial treats keyword arguments as default values, though they become
keyword-only as a result :
f1 = functools.partial(g, p="p1")
On Thu, Jan 21, 2016, 08:35 Paulo da Silva
wrote:
> Hi all.
>
> What is the fastest implementation of the following code?
>
> def g(p):
> ...
> ret
It just means significant digits in the general format, which alternates
between 10-exponent notation and plain decimal notation.
https://docs.python.org/3.4/library/string.html#format-specification-mini-language
>>> '{:.3}'.format(0.356785)
'3.57e-05'
>>> '{:.3}'.format(0.0035678
And... 3.0 is released! :-)
Feel free to contact me or reply should you encounter any issues!
http://clize.readthedocs.org/en/3.0/releases.html#v3-0
On Mon, 27 Apr 2015 at 02:02 Yann Kaiser wrote:
> Hello everyone!
>
> After a few years in development, I am proud to say Clize is la
On Tue, 28 Apr 2015 at 19:16 Chris Angelico wrote:
> On Wed, Apr 29, 2015 at 11:55 AM, Yann Kaiser
> wrote:
> > I'm aware of the pattern, and I don't really like it, especially because
> it
> > gets weird when multiple modules are involved. You'd have to impo
On Mon, 27 Apr 2015 at 22:30 Ethan Furman wrote:
> On 04/28, Chris Angelico wrote:
>
> > That's a lot of separate pieces. Here's the docstringargs equivalent:
> >
> > https://github.com/Rosuav/snippets/blob/dsa/snippets.py
>
> Just for grins, here's that using Scription:
>
> -- 8< ---
On Mon, 27 Apr 2015 at 17:04 Chris Angelico wrote:
> On Mon, Apr 27, 2015 at 7:02 PM, Yann Kaiser
> wrote:
> > Hello everyone!
> >
> > After a few years in development, I am proud to say Clize is landing its
> > feet again and is now in beta for an upcoming relea
On Mon, 27 Apr 2015 at 20:28 Chris Angelico wrote:
> On Tue, Apr 28, 2015 at 12:45 PM, Yann Kaiser
> wrote:
> > On Mon, 27 Apr 2015 at 17:04 Chris Angelico wrote:
> >> Interesting. I've also been working on a simpler arg handling module;
> >> maybe we can wo
Hello everyone!
After a few years in development, I am proud to say Clize is landing its
feet again and is now in beta for an upcoming release.
You can try it out usingpip install --user clize=3.0b1and you can
browse the docs athttps://clize.readthedocs.org/
For those who'd like an e
15 matches
Mail list logo