[Python-Dev] Python private and protected variables and methods

2016-11-29 Thread Annapoornima Koppad
Dear All,

While teaching Python protected variables, I figured out the oddity about
Python.

I am using Python 2.7.12+ for my teaching.

There is not really a concept of protected variables in Python, is it?

For a more detailed explanation of what I am trying to do, please read this
article, http://radek.io/2011/07/21/private-protected-and-public-in-python/

It that is the case, Python is not suitable for companies that require
secure transactions such as  Banking softwares. What solution are possible
to overcome data masquerading attempts that might result because of this?

Thanks and regards,
Annapoornima
www.pyladies.co.in
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] PyObject_CallFunction(func, "O", arg) special case

2016-12-12 Thread Annapoornima Koppad
I am not sure, but soon, I will be a great fan of your work, once I get to
work on this!

Thank your for inspiring me to work on these stuff!

Best regards,
Annapoornima

On Fri, Dec 9, 2016 at 11:33 PM, Victor Stinner 
wrote:

> 2016-12-09 18:46 GMT+01:00 Victor Stinner :
> > Last days, I patched functions of PyObject_CallFunction() family to
> > use internally fast calls.
> > (...)
> > http://bugs.python.org/issue28915
>
> Oh, I forgot to mention the performance results of these changes.
> Python slots are now a little bit faster. Extract of the issue:
> http://bugs.python.org/issue28915#msg282748
>
> Microbenchmark on a simple class with an __int__() method, call int(o):
> int(o): Median +- std dev: [ref] 239 ns +- 13 ns -> [patch] 219 ns +-
> 14 ns: 1.10x faster (-9%)
>
> Microbenchmark on a simple class with an __getitem__() method, call o[100]:
> o[100]: Median +- std dev: [ref] 211 ns +- 11 ns -> [patch] 172 ns +-
> 11 ns: 1.23x faster (-19%)
>
>
> Comparison between Python 2.7, 3.5, 3.7 and 3.7+patch, 3.5 is used as
> the reference:
>
> int(o)
> ==
>
> Median +- std dev: [3.5] 271 ns +- 15 ns -> [3.7] 239 ns +- 13 ns:
> 1.13x faster (-12%)
> Median +- std dev: [3.5] 271 ns +- 15 ns -> [patch] 219 ns +- 14 ns:
> 1.24x faster (-19%)
> Median +- std dev: [3.5] 271 ns +- 15 ns -> [2.7] 401 ns +- 21 ns:
> 1.48x slower (+48%)
>
> o[100]
> ==
>
> Median +- std dev: [3.5] 206 ns +- 5 ns -> [3.7] 211 ns +- 11 ns:
> 1.02x slower (+2%)
> Not significant!
> Median +- std dev: [3.5] 206 ns +- 5 ns -> [patch] 172 ns +- 11 ns:
> 1.20x faster (-17%)
> Median +- std dev: [3.5] 206 ns +- 5 ns -> [2.7] 254 ns +- 15 ns:
> 1.23x slower (+23%)
>
> Victor
> ___
> Python-Dev mailing list
> Python-Dev@python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: https://mail.python.org/mailman/options/python-dev/
> annakoppad%40gmail.com
>
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com