Re: is_ as method or property?

2014-12-15 Thread Mateusz Loskot
On 13 December 2014 at 12:24, Steven D'Aprano wrote: > Mateusz Loskot wrote: > >> On 12 December 2014 at 12:26, Chris Angelico wrote: >>> On Fri, Dec 12, 2014 at 10:21 PM, Mateusz Loskot >>> wrote: >>>> I've got several cases which are n

Re: is_ as method or property?

2014-12-12 Thread Mateusz Loskot
On 12 December 2014 at 22:14, Chris Angelico wrote: > On Sat, Dec 13, 2014 at 8:03 AM, Mateusz Loskot wrote: >> On 12 December 2014 at 12:26, Chris Angelico wrote: >>> On Fri, Dec 12, 2014 at 10:21 PM, Mateusz Loskot wrote: >>>> I've got several cases wh

Re: is_ as method or property?

2014-12-12 Thread Mateusz Loskot
On 12 December 2014 at 12:26, Chris Angelico wrote: > On Fri, Dec 12, 2014 at 10:21 PM, Mateusz Loskot wrote: >> I've got several cases which are not obvious to me. >> For instance, class Foo has a boolean attribute, read-write, >> which I see a couple of realisati

Re: is_ as method or property?

2014-12-12 Thread Mateusz Loskot
On 11 December 2014 at 19:20, Chris Angelico wrote: > On Fri, Dec 12, 2014 at 4:34 AM, Mateusz Loskot wrote: >> If a class member function simply tests something and >> returns a b::oolean call it >> >> def is_(): >> pass >> >> like 'is_e

is_ as method or property?

2014-12-11 Thread Mateusz Loskot
icates? [1] *Naming Conventions* by Thorsten Kampe https://mail.python.org/pipermail/python-list/2007-June/438156.html Best regards, -- Mateusz Loskot, http://mateusz.loskot.net -- https://mail.python.org/mailman/listinfo/python-list

Fwd: Format of datetime dump

2012-10-19 Thread Mateusz Loskot
ssage -- From: Mateusz Loskot Date: 19 October 2012 13:58 Subject: Format of datetime dump To: yaml-c...@lists.sourceforge.net Hi, Given this snippet: yaml.dump({'date':datetime.datetime.now()}) "{date: !!timestamp '2012-10-19 01:32:41.674322'}\n" Could anyone enlig

Read-only attribute in module

2012-02-09 Thread Mateusz Loskot
lag) # OK xyz.flag = 0# error due to no write access Best regards, -- Mateusz Loskot, http://mateusz.loskot.net -- http://mail.python.org/mailman/listinfo/python-list

How do I tell "incomplete input" from "invalid input"?

2012-01-11 Thread Mateusz Loskot
ion compile() is not publicly available. There is PyRun_InteractiveLoop mechanism but it is tightly coupled to FILE-based I/O which is not always available when Python is embedded, so the loop is useless in number of situations. Have I overlooked any other obvious solution? Finally, it would be hel

Re: PyEval_EvalCodeEx return value

2011-09-24 Thread Mateusz Loskot
ation in C++ interacts with Python programs provided by users. Depending on what these programs request, various PyObject objects are created and returned back, etc. I understand it's difficult to discuss it without long essays or without providing the code, etc. So, I can only discuss a

Re: PyEval_EvalCodeEx return value

2011-09-23 Thread Mateusz Loskot
On 23/09/11 00:47, Mark Hammond wrote: On 20/09/2011 8:34 PM, Mateusz Loskot wrote: I'm trying to dig out details about what exactly is the return value the of PyEval_EvalCodeEx function in Python 3.x The documentation is sparse, unfortunately. Perhaps I'm looking at wrong function.

PyEval_EvalCodeEx return value

2011-09-20 Thread Mateusz Loskot
access "f" value directly from PyEval_EvalCode return object: PyObject* evalRet = ::PyEval_EvalCode(...); But, I can't find any details what the "evalRet" actually is. Any pointers would be helpful. Best regards, -- Mateusz Loskot, http://mateusz.loskot.net Charter

Why PyImport_ExecCodeModule takes char*?

2011-08-26 Thread Mateusz Loskot
Hi, I'm wondering, why PyImport_ExecCodeModule function takes char* instead of const char*? Best regards, -- Mateusz Loskot, http://mateusz.loskot.net Charter Member of OSGeo, http://osgeo.org Member of ACCU, http://accu.org -- http://mail.python.org/mailman/listinfo/python-list