Re: [Python-Dev] GSoC: Replace MS Windows Console with Unicode UI

2009-03-24 Thread INADA Naoki
Hi. I'm Japanese and non-ascii charactor user. (cp932) We have to use IME to input non-ascii charactor in Windows. When chcp 65001 in cmd.exe, we cannot use IME on cmd.exe. So setting codepage to 65001 make output universal but make input ascii-only. Sit!!! I hope PyQtShell

Re: [Python-Dev] GSoC: Replace MS Windows Console with Unicode UI

2009-07-22 Thread INADA Naoki
Hi. We have to use IME to input non-ascii charactor in Windows. When chcp 65001 in cmd.exe, we cannot use IME on cmd.exe. So setting codepage to 65001 make output universal but make input ascii-only. Sit!!! Is there a code page that still allows IME input, but supports all of Unicode? I

Re: [Python-Dev] Packaging and binary distributions

2011-10-30 Thread INADA Naoki
? Paul. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/songofacandy%40gmail.com -- INADA Naoki  songofaca...@gmail.com

Re: [Python-Dev] Status regarding Old vs. Advanced String Formating

2012-02-25 Thread INADA Naoki
Unsubscribe: http://mail.python.org/mailman/options/python-dev/songofacandy%40gmail.com -- INADA Naoki  songofaca...@gmail.com ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http

Re: [Python-Dev] Playing with a new theme for the docs

2012-03-21 Thread INADA Naoki
Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/songofacandy%40gmail.com -- INADA Naoki  songofaca...@gmail.com ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] logging package vs unicode

2010-08-03 Thread INADA Naoki
://www.simplistix.co.uk ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/songofacandy%40gmail.com -- INADA Naoki  songofaca

[Python-Dev] What's L2R status?

2011-02-19 Thread INADA Naoki
C ... C += 1 ... return C ... {x(): x(), x(): x()} {2: 1, 4: 3} -- INADA Naoki  songofaca...@gmail.com ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org

Re: [Python-Dev] What's L2R status?

2011-02-19 Thread INADA Naoki
Sorry. There is a issue already. http://bugs.python.org/issue11205 On Sun, Feb 20, 2011 at 1:19 AM, INADA Naoki songofaca...@gmail.com wrote: Ref: http://bugs.python.org/issue448679 Has this bug fixed already? This bug seems not be fixed for Python 2.6 and Python 3.2rc3. Python 3.2rc3

Re: [Python-Dev] counterintuitive behavior (bug?) in Counter with +=

2011-10-03 Thread INADA Naoki
@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/songofacandy%40gmail.com -- INADA Naoki  songofaca...@gmail.com ___ Python-Dev mailing list Python-Dev@python.org http

Re: [Python-Dev] RFC: PEP 460: Add bytes % args and bytes.format(args) to Python 3.5

2014-01-08 Thread INADA Naoki
for those who haven't learned that yet - which was almost all of us at some point when we started programming. Totally agree with you. -- INADA Naoki songofaca...@gmail.com ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman

Re: [Python-Dev] Python3 complexity

2014-01-09 Thread INADA Naoki
/mailman/options/python-dev/songofacandy%40gmail.com -- INADA Naoki songofaca...@gmail.com ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options

Re: [Python-Dev] Python3 complexity

2014-01-10 Thread INADA Naoki
://mail.python.org/mailman/options/python-dev/songofacandy%40gmail.com -- INADA Naoki songofaca...@gmail.com ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org

Re: [Python-Dev] RFC: PEP 460: Add bytes % args and bytes.format(args) to Python 3.5

2014-01-10 Thread INADA Naoki
Unsubscribe: https://mail.python.org/mailman/options/python-dev/songofacandy%40gmail.com -- INADA Naoki songofaca...@gmail.com ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https

Re: [Python-Dev] RFC: PEP 460: Add bytes % args and bytes.format(args) to Python 3.5

2014-01-10 Thread INADA Naoki
Unsubscribe: https://mail.python.org/mailman/options/python-dev/songofacandy%40gmail.com -- INADA Naoki songofaca...@gmail.com ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https

Re: [Python-Dev] cpython (3.3): Update Sphinx toolchain.

2014-01-12 Thread INADA Naoki
: https://mail.python.org/mailman/options/python-dev/songofacandy%40gmail.com -- INADA Naoki songofaca...@gmail.com ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https

Re: [Python-Dev] PEP 460: allowing %d and %f and mojibake

2014-01-12 Thread INADA Naoki
:-) ___ 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/songofacandy%40gmail.com -- INADA Naoki songofaca...@gmail.com

Re: [Python-Dev] pootle.python.org is down

2014-02-16 Thread INADA Naoki
https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/songofacandy%40gmail.com -- INADA Naoki songofaca...@gmail.com ___ Python-Dev mailing list Python-Dev@python.org https

[Python-Dev] What is the sequence? ([issue16728] collections.abc.Sequence shoud provide __subclasshook__

2012-12-20 Thread INADA Naoki
it is hashable or whether it is a mapping. And collections.abc.Sequence requires index() and count(). What is the requirement for calling something is sequence? Off Topc: Sequence.__iter__ uses __len__ and __getitem__ but default iterator uses only __getitem__. This difference is ugly. -- INADA

Re: [Python-Dev] Is file.readlines(sizehint=N) broken on 2.7?

2013-04-05 Thread INADA Naoki
/ ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/songofacandy%40gmail.com -- INADA Naoki songofaca...@gmail.com

[Python-Dev] Old libc's isspace() bug on FreeBSD brings back on Mac OS X?

2009-10-01 Thread INADA Naoki
I found this hg's issue. http://mercurial.selenic.com/bts/msg8375 I think below fix is not enabled on Mac OS X. http://svn.python.org/view/python/trunk/Include/pyport.h?view=diffpathrev=43219r1=36792r2=36793 I can't confirm it because I am not Mac OS X user. Can anyone confirm it? -- Naoki

Re: [Python-Dev] Old libc's isspace() bug on FreeBSD brings back on Mac OS X?

2009-10-02 Thread INADA Naoki
Do you have a testcase that shows what the problem is? Ronald s = '\xa0' assert s.strip() == s import locale locale.setlocale(locale.LC_ALL, 'en_US.UTF-8') 'en_US.UTF-8' assert s.strip() == s Second assert failed on Snow Leopard. -- Naoki INADA songofaca...@gmail.com

Re: [Python-Dev] Old libc's isspace() bug on FreeBSD brings back on Mac OS X?

2009-10-02 Thread INADA Naoki
Confirmed on 10.6 for 2.6.3 and 2.7a0. For 3.2a0 both asserts fail. OK. `s = '\xa0'` should be `s = b'\xa0'`. Should I file a bug? -- Naoki INADA songofaca...@gmail.com ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] transitioning from % to {} formatting

2009-10-04 Thread INADA Naoki
What about using string prefix 'f'? f{foo} and {bar} % something == {foo} and {bar}.format(something) s = f{foo} t = %(bar)s s + t # raises Exception Transition plan: n: Just add F prefix. And adding format_string in future. n+1: deprecate __mod__() without 'F'. n+2: libraries use

Re: [Python-Dev] transitioning from % to {} formatting

2009-10-04 Thread INADA Naoki
-1 That requires keeping formatting information around in every string instance. Adding new format_string class avoids it. unicode(foo) = ufoo format_string(foo) = ffoo This way's pros: * Many libraries can use one transition way. * Transition stage syncs to Python version. library A uses {}

Re: [Python-Dev] Old libc's isspace() bug on FreeBSD brings back on Mac OS X?

2009-10-06 Thread INADA Naoki
I filed as issue7072. On Tue, Oct 6, 2009 at 10:49 PM, Ronald Oussoren ronaldousso...@mac.com wrote: On 3 Oct, 2009, at 1:40, INADA Naoki wrote: Confirmed on 10.6 for 2.6.3 and 2.7a0. For 3.2a0 both asserts fail. OK. `s = '\xa0'` should be `s = b'\xa0'`. Should I file a bug? Please do

Re: [Python-Dev] Language Summit Follow-Up

2014-05-28 Thread INADA Naoki
://warehouse.python.org/project/MySQL-python/ to Python 3. :) I've did it. https://github.com/PyMySQL/mysqlclient-python https://pypi.python.org/pypi/mysqlclient -- INADA Naoki songofaca...@gmail.com ___ Python-Dev mailing list Python-Dev@python.org https

Re: [Python-Dev] Internal representation of strings and Micropython

2014-06-04 Thread INADA Naoki
. ___ 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/songofacandy%40gmail.com -- INADA Naoki songofaca...@gmail.com

Re: [Python-Dev] PEP 394 - Clarification of what python command should invoke

2014-09-19 Thread INADA Naoki
://mail.python.org/mailman/options/python-dev/songofacandy%40gmail.com -- INADA Naoki songofaca...@gmail.com ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options

Re: [Python-Dev] 3.5 release schedule PEP

2014-09-25 Thread INADA Naoki
-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/songofacandy%40gmail.com -- INADA Naoki songofaca...@gmail.com ___ Python-Dev mailing list

[Python-Dev] No tags in semi-official github mirror of cpython repository.

2015-05-15 Thread INADA Naoki
tags too? Thanks -- INADA Naoki songofaca...@gmail.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

Re: [Python-Dev] VS 2010 compiler

2015-09-25 Thread INADA Naoki
dows > > Be considered? > ___ > 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/songofacandy%40gmail.com

[Python-Dev] Idea: more compact, interned string key only dict for namespace.

2016-06-22 Thread INADA Naoki
already. If we provide _PyDict_NewForNamespace to extension modules, json decoder can have option to use this, too. -- INADA Naoki <songofaca...@gmail.com> ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/

Re: [Python-Dev] Compact ordered dict is not ordered for split table. (was: PEP XXX: Compact ordered dict

2016-06-21 Thread INADA Naoki
ess change may cause sudden memory usage increase. (__slots__ is more predicable). On Wed, Jun 22, 2016 at 12:10 AM, INADA Naoki <songofaca...@gmail.com> wrote: > I'm sorry, but I hadn't realized which compact ordered dict is > not ordered for split ta

Re: [Python-Dev] PEP XXX: Compact ordered dict

2016-06-22 Thread INADA Naoki
FYI, Here is calculated size of each dict by len(d). https://docs.google.com/spreadsheets/d/1nN5y6IsiJGdNxD7L7KBXmhdUyXjuRAQR_WbrS8zf6mA/edit?usp=sharing On Tue, Jun 21, 2016 at 12:17 PM, Oleg Broytman <p...@phdru.name> wrote: > Hi! > > On Tue, Jun 21, 2016 at 11:14:39AM +09

[Python-Dev] Compact dict implementations (was: PEP 468

2016-06-17 Thread INADA Naoki
implementation, I want to see comments and tests from core developers. Please come to core-mentorship ML or pull request and try it if you interested in. Regards, -- INADA Naoki <songofaca...@gmail.com> ___ Python-Dev mailing list Python-Dev@python.org

[Python-Dev] Compact ordered dict is not ordered for split table. (was: PEP XXX: Compact ordered dict

2016-06-21 Thread INADA Naoki
ems() dict_items([('a', 1), ('b', 2)]) >>> b.__dict__.items() dict_items([('a', 4), ('b', 3)]) This doesn't affects to **kwargs and class namespace. But if we change the language spec to dict preserves insertion order, this should be addressed. On Tue, Jun 21, 2016 at 2:02 PM, INADA Naoki

Re: [Python-Dev] PEP 487: Simpler customization of class creation

2016-06-21 Thread INADA Naoki
On Wed, Jun 22, 2016 at 2:50 AM, Raymond Hettinger wrote: > >> On Jun 21, 2016, at 10:18 AM, Guido van Rossum wrote: >> >> Judging from Inada's message there seems to be some confusion about how well >> the compact dict preserves order (personally

Re: [Python-Dev] Compact dict implementations (was: PEP 468

2016-06-18 Thread INADA Naoki
I've sent my patch to issue tracker, since I can't fix some remains TODOs by myself. http://bugs.python.org/issue27350 On Fri, Jun 17, 2016 at 6:15 PM, INADA Naoki <songofaca...@gmail.com> wrote: > Hi, developers. > > I'm trying to implement compact dict. > https://github.c

Re: [Python-Dev] Compact dict implementations (was: PEP 468

2016-06-18 Thread INADA Naoki
em in core-mentor ML or bugs.python.org. Thanks -- INADA Naoki <songofaca...@gmail.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-de

Re: [Python-Dev] Idea: more compact, interned string key only dict for namespace.

2016-06-23 Thread INADA Naoki
:12.16elapsed 99%CPU (0avgtext+0avgdata 165884maxresident)k 480inputs+200792outputs (0major+56947minor)pagefaults 0swaps 71.84user 0.27system 1:12.13elapsed 99%CPU (0avgtext+0avgdata 166888maxresident)k 640inputs+200792outputs (5major+56834minor)pagefaults 0swaps -- INADA Naoki <songof

Re: [Python-Dev] Idea: more compact, interned string key only dict for namespace.

2016-06-22 Thread INADA Naoki
- > > Interned key only dict is still larger than key-shared dict. > > But it can be used for more purpose. It can be used for interning string > for example. It can be used to kwargs dict when all keys are interned > already. > > If we provide _PyDict_NewForNamespace

Re: [Python-Dev] Idea: more compact, interned string key only dict for namespace.

2016-06-22 Thread INADA Naoki
If "orderd, except key sharing dict" is acceptable, no problem. Key sharing compact dict is smaller than current key sharing dict of Python 3.5 for most cases. https://docs.google.com/spreadsheets/d/1nN5y6IsiJGdNxD7L7KBXmhdUyXjuRAQR_WbrS8zf6mA/edit#gid=0 Regards, -- INADA Naoki <songo

Re: [Python-Dev] PEP XXX: Compact ordered dict

2016-06-23 Thread INADA Naoki
On Fri, Jun 24, 2016 at 12:03 AM, Eric Snow <ericsnowcurren...@gmail.com> wrote: > On Mon, Jun 20, 2016 at 11:02 PM, INADA Naoki <songofaca...@gmail.com> wrote: >> On Tue, Jun 21, 2016 at 12:17 PM, Oleg Broytman <p...@phdru.name> wrote: >>> (if a PEP is neede

Re: [Python-Dev] PEP 520: Ordered Class Definition Namespace

2016-06-20 Thread INADA Naoki
>> >> Finally, it seems someone is working on making all dicts ordered. Does that >> mean this will soon be obsolete? > > Nope. Having an ordered definition namespace by default does not give > us __definition_order__ for free. Furthermore, the compact dict under > consideration isn't strictly

Re: [Python-Dev] PEP XXX: Compact ordered dict

2016-06-20 Thread INADA Naoki
On Tue, Jun 21, 2016 at 12:17 PM, Oleg Broytman <p...@phdru.name> wrote: > Hi! > > On Tue, Jun 21, 2016 at 11:14:39AM +0900, INADA Naoki > <songofaca...@gmail.com> wrote: >> Here is my draft, but I haven't >> posted it yet since >> my English is much

Re: [Python-Dev] Idea: more compact, interned string key only dict for namespace.

2016-06-24 Thread INADA Naoki
com/methane/cpython/tree/interned-dict (cb0a125c79 passes most tests, except tests using sys.getsizeof()). -- INADA Naoki <songofaca...@gmail.com> ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev U

Re: [Python-Dev] Compact dict implementations (was: PEP 468

2016-06-18 Thread INADA Naoki
> > pybench: https://gist.github.com/methane/cfad1427d87ceff9310350e78a214880 > benchmark: https://gist.github.com/methane/5eb11fdd93863813b222e795ca0bfc1f > > Is it acceptable? latest result is here https://gist.github.com/methane/22cf5d1dadb62bc87a15e9244a9d0ab8 -- INADA Na

Re: [Python-Dev] Compact dict implementations (was: PEP 468

2016-06-18 Thread INADA Naoki
. In case of very small dict, index hash (8byte) and first two entries (24*2=48byte) can be on one cache line. * Easy to implement "split dictionary" (aka. key sharing dictionary). You can see what I implemented in here. https://github.com/methane/cpy

Re: [Python-Dev] Compact ordered dict is not ordered for split table. (was: PEP XXX: Compact ordered dict

2016-06-23 Thread INADA Naoki
ered dict is more efficient than key-sharing dict in case of Sphinx. It means, instance __dict__ is not dominance. I'll implement POC of my new idea and compare it with Sphinx. If you know another good *real application*, which is easy to benchmark, please tell me it. -- INADA Naoki <songofa

Re: [Python-Dev] Compact ordered dict is not ordered for split table. (was: PEP XXX: Compact ordered dict

2016-06-26 Thread INADA Naoki
se so > much thanks to compact dict. I did it. issue27350 is now ordered for key sharing dict, too. -- INADA Naoki <songofaca...@gmail.com> ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python

Re: [Python-Dev] Compact ordered dict is not ordered for split table. (was: PEP XXX: Compact ordered dict

2016-06-25 Thread INADA Naoki
On Sun, Jun 26, 2016 at 8:40 AM, Franklin? Lee <leewangzhong+pyt...@gmail.com> wrote: > On Jun 21, 2016 11:12 AM, "INADA Naoki" <songofaca...@gmail.com> wrote: >> >> I'm sorry, but I hadn't realized which compact ordered dict is >> not ordered for s

Re: [Python-Dev] FAT Python (lack of) performance

2016-01-28 Thread INADA Naoki
r from our priorities is almost always going to be > irritating rather than helpful. > > Cheers, > Nick. > > -- > Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia > -- INADA Naoki <songofaca...@gmail.com>

Re: [Python-Dev] FAT Python (lack of) performance

2016-01-25 Thread INADA Naoki
I wonder if CPython is more faster, especially about global lookup and function call. -- INADA Naoki <songofaca...@gmail.com> ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe

Re: [Python-Dev] FAT Python (lack of) performance

2016-01-25 Thread INADA Naoki
On Tue, Jan 26, 2016 at 12:02 PM, Andrew Barnert <abarn...@yahoo.com> wrote: > On Jan 25, 2016, at 18:21, INADA Naoki <songofaca...@gmail.com> wrote: > > > > I'm very interested in it. > > > > Ruby 2.2 and PHP 7 are faster than Python 2. > > P

Re: [Python-Dev] FAT Python (lack of) performance

2016-01-25 Thread INADA Naoki
On Tue, Jan 26, 2016 at 2:44 PM, Andrew Barnert <abarn...@yahoo.com> wrote: > On Jan 25, 2016, at 19:32, INADA Naoki <songofaca...@gmail.com> wrote: > > On Tue, Jan 26, 2016 at 12:02 PM, Andrew Barnert <abarn...@yahoo.com> > wrote: > >> On Jan 25,

Re: [Python-Dev] FAT Python (lack of) performance

2016-01-25 Thread INADA Naoki
toptimizer project which is written in pure Python: > > https://fatoptimizer.readthedocs.org/en/latest/ > > Victor > ___ > Python-Dev mailing list > Python-Dev@python.org > https://mail.python.org/mailman/listinfo/python-dev

Re: [Python-Dev] Defining a path protocol

2016-04-07 Thread INADA Naoki
FYI, Ruby's Pathname class doesn't inherit String. http://ruby-doc.org/stdlib-2.1.0/libdoc/pathname/rdoc/Pathname.html Ruby has two "convert to string" method. `.to_s` is like `__str__`. `.to_str` is like `__index__` but for str. It is used for implicit conversion. File.open accepts any object

Re: [Python-Dev] Defining a path protocol

2016-04-07 Thread INADA Naoki
gineering. So I'm -0.5 on adding __fspath__. I'm +1 on adding general protocol for *coerce to string* like __index__. +0.5 on inherit from str (and drop byte path support). -- INADA Naoki <songofaca...@gmail.com> ___ Python-Dev mailing l

Re: [Python-Dev] Pathlib enhancements - acceptable inputs and outputs for __fspath__ and os.fspath()

2016-04-11 Thread INADA Naoki
Sorry, I've forgot to use "Reply All". On Tue, Apr 12, 2016 at 9:49 AM, INADA Naoki <songofaca...@gmail.com> wrote: > IHMO it's safer to get an encoding error rather than no error when you >> concatenate two byte strings encoded to two different encodings (mojibake).

Re: [Python-Dev] Status of Python 3.6 PEPs?

2016-07-12 Thread INADA Naoki
> > "PEP 520 -- Preserving Class Attribute Definition Order" > https://www.python.org/dev/peps/pep-0520/ > => accepted -- what is the status of its implementation? > ... > > > I also see some discussions for even more compact dict implementation. > Here is implementation of the compact dict

Re: [Python-Dev] Review request: issue 27350, compact ordered dict

2016-08-10 Thread INADA Naoki
API) > * there are nice speedups > * the C version of OrderedDict can be killed > * it saves memory, on 64bit by quite a bit (not everyone stores more > than 4bln items in a dictionary) > * it solves the problem of tests relying on order in dictionaries > > In short, it has no dow

Re: [Python-Dev] C99

2016-08-05 Thread INADA Naoki
d with C99 adoption but it does point out that there might be more >> ramifications to this decision. What may be more difficult is to judge the >> impact on other platforms that don't get as much attention from most of us. >> For this to move forward, we need to be able to state wha

Re: [Python-Dev] C99

2016-08-06 Thread INADA Naoki
>> >> * inline function >> static inline function can be used instead of may macros. >> It is more readable, and type safe. > > My experience from a few months ago with some cross-platform code is > that clang, GCC and MSVC have different ideas about how inline > functions in C work. Are they

[Python-Dev] Review request: issue 27350, compact ordered dict

2016-08-09 Thread INADA Naoki
://morepypy.blogspot.jp/2015/01/faster-more-memory-efficient-and-more.html -- INADA Naoki <songofaca...@gmail.com> ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/o

Re: [Python-Dev] Review request: issue 27350, compact ordered dict

2016-08-15 Thread INADA Naoki
>> >> I've implemented compact and ordered dictionary [1], which PyPy >> implemented in 2015 [2]. > > > Does this mean that keyword arguments will become ordered? > > Yury > Yes, regardless it will be language spec or just an implementation detail like PyPy

Re: [Python-Dev] Investigating Python memory footprint of one real Web application

2017-02-02 Thread INADA Naoki
; -- > Ivan > > > On 23 January 2017 at 12:25, INADA Naoki <songofaca...@gmail.com> wrote: >> >> On Fri, Jan 20, 2017 at 8:52 PM, Ivan Levkivskyi <levkivs...@gmail.com> >> wrote: >> > On 20 January 2017 at 11:49, INADA Naoki <songofaca.

Re: [Python-Dev] Investigating Python memory footprint of one real Web application

2017-01-23 Thread INADA Naoki
On Mon, Jan 23, 2017 at 8:33 PM, Victor Stinner <victor.stin...@gmail.com> wrote: > 2017-01-23 12:25 GMT+01:00 INADA Naoki <songofaca...@gmail.com>: >> I gave advice to use 'List[User]' instead of List[User] to the team of >> the project, >> if the team think RAM

Re: [Python-Dev] Investigating Python memory footprint of one real Web application

2017-01-23 Thread INADA Naoki
On Fri, Jan 20, 2017 at 8:52 PM, Ivan Levkivskyi <levkivs...@gmail.com> wrote: > On 20 January 2017 at 11:49, INADA Naoki <songofaca...@gmail.com> wrote: >> >> * typing may increase memory footprint, through functions >> __attributes__ and abc. >>* Can w

Re: [Python-Dev] Investigating Python memory footprint of one real Web application

2017-01-23 Thread INADA Naoki
>> So basically the equivalent of -OO for docstrings? Maybe this can be the >> final motivator for some of us to come up with a design to generalize -O or >> something as it keeps coming up. > Yes, please. We've talked about generalizing this for years now. FWIW, I know > of projects that run

Re: [Python-Dev] Investigating Python memory footprint of one real Web application

2017-01-24 Thread INADA Naoki
> 3. I am -1 on ignoring annotations altogether. Sometimes they could be > helpful at runtime: typing.NamedTuple and mypy_extensions.TypedDict are two > examples. ignoring annotations doesn't mean ignoring typing at all. You can use typing.NamedTuple even when functions doesn't have

Re: [Python-Dev] Investigating Python memory footprint of one real Web application

2017-01-25 Thread INADA Naoki
More detailed information: ## With annotations === tracemalloc stat === traced: (46969277, 46983753) 18,048,888 / 181112 File "", line 488 File "", line 780 File "", line 675 === size by types === dict 9,083,816 (8,870.91KB) / 21846 = 415.811bytes (21.38%) tuple

Re: [Python-Dev] Investigating Python memory footprint of one real Web application

2017-01-20 Thread INADA Naoki
> > "this script counts static memory usage. It doesn’t care about dynamic > memory usage of processing real request" > > You may be trying to optimize something which is only a very small > fraction of your actual memory footprint. That said, the marshal > module could certainly try to intern

Re: [Python-Dev] Investigating Python memory footprint of one real Web application

2017-01-20 Thread INADA Naoki
I've filed an issue about merging tuples: http://bugs.python.org/issue29336 I'll try the patch with my company's codebase again in next week. But could someone try the patch with realworld large application too? Or if you know OSS large application easy to install, could you share

Re: [Python-Dev] Investigating Python memory footprint of one real Web application

2017-01-25 Thread INADA Naoki
On Thu, Jan 26, 2017 at 2:33 AM, Antoine Pitrou <solip...@pitrou.net> wrote: > On Wed, 25 Jan 2017 20:54:02 +0900 > INADA Naoki <songofaca...@gmail.com> wrote: >> >> ## Stripped annotation + without pydebug > > Does this mean the other measurements were

Re: [Python-Dev] Translated Python documentation

2017-02-24 Thread INADA Naoki
> Where should these translated docs live and how does one make it clear to > users reading them that doc bugs shouldn't be submitted to the main bug > tracker/github repo? > We setup github page. See https://python-doc-ja.github.io/py36/ (note that version switcher won't work because this html

[Python-Dev] Can I commit a hack for translation? (Was: Translated Python documentation

2017-02-24 Thread INADA Naoki
Thanks, Victor and all. This thread is very encouraging for me. Currently, I have a suspended pull request: https://github.com/python/cpython/pull/195 This pull request (1) fixes "CPython implementation detail:" label is disappear when it's body is translated, and (2) make the label

Re: [Python-Dev] Translated Python documentation

2017-02-24 Thread INADA Naoki
On Fri, Feb 24, 2017 at 9:20 PM, Berker Peksağ wrote: > On Thu, Feb 23, 2017 at 12:01 AM, Victor Stinner > wrote: >> 2017-02-22 19:04 GMT+01:00 Serhiy Storchaka : >>> What percent of lines is changed between bugfix releases?

Re: [Python-Dev] Translated Python documentation

2017-02-25 Thread INADA Naoki
Yes, right place to discussion is one of important things what I want. I haven't know about i18n-sig. Is it better than docs-sig? Another thing I want is agreement to use project name looks like (semi)official project. We used "python-doc-jp" name on Transifex at first. But since some people

Re: [Python-Dev] Deterministic builds of the interpreter

2017-02-10 Thread INADA Naoki
On Fri, Feb 10, 2017 at 7:58 PM, Freddy Rietdijk wrote: > For Python 3.5 PYTHONHASHSEED doesn't seem to be sufficient, these items > still seem indeterministic. > To be sure, I ran `PYTHONHASHSEED=1 $out/bin/python -m compileall -f $out` > where $out is the path where I

Re: [Python-Dev] Deterministic builds of the interpreter

2017-02-09 Thread INADA Naoki
As reading [4], mtime is not 0. data = bytearray(MAGIC_NUMBER) data.extend(_w_long(mtime)) data.extend(_w_long(source_size)) data.extend(marshal.dumps(code)) First 4 bytes are magic. Next 4 bytes are mtime. │ │ │ │ -: 160d 0d0a 6b2e 9c58 6c21 e300

Re: [Python-Dev] Investigating Python memory footprint of one real Web application

2017-01-24 Thread INADA Naoki
FWIW, I tried to skip compiler_visit_annotations() in Python/compile.c a) default: 41278060 b) remove annotations: 37140094 c) (b) + const merge: 35933436 (a-b)/a = 10% (a-c)/a = 13% And here are top 3 tracebacks from tracemalloc: 15109615 (/180598) File "", line 488 File

Re: [Python-Dev] Investigating Python memory footprint of one real Web application

2017-01-24 Thread INADA Naoki
On Tue, Jan 24, 2017 at 11:08 PM, Victor Stinner <victor.stin...@gmail.com> wrote: > 2017-01-24 15:00 GMT+01:00 INADA Naoki <songofaca...@gmail.com>: >> And here are top 3 tracebacks from tracemalloc: >> >> 15109615 (/180598) >> File "", line

Re: [Python-Dev] Deterministic builds of the interpreter

2017-02-09 Thread INADA Naoki
> > These all seem to be sets. Maybe, PYTHONHASHSEED help you. https://docs.python.org/3/using/cmdline.html#envvar-PYTHONHASHSEED > > On Thu, Feb 9, 2017 at 6:04 PM, INADA Naoki <songofaca...@gmail.com> wrote: >> >> As reading [4], mtime is not 0. >> >> dat

Re: [Python-Dev] Can we use "designated initializer" widely in core modules?

2017-01-17 Thread INADA Naoki
On Wed, Jan 18, 2017 at 9:00 AM, Erik <pyt...@lucidity.plus.com> wrote: > On 17/01/17 06:32, INADA Naoki wrote: >> >> With designated initializer, it becomes: >> >> 0, /* tp_free */ >> +.tp_fastcall = (fastternary

Re: [Python-Dev] Can we use "designated initializer" widely in coremodules?

2017-01-17 Thread INADA Naoki
On Wed, Jan 18, 2017 at 8:48 AM, Larry Hastings wrote: > > On 01/17/2017 12:02 PM, Steve Dower wrote: > > Avoiding header files would be my only request. As Brett says, the C99 > requirement should not be enforced on all embedders or extenders, so we > should try and keep the

[Python-Dev] Can we use "designated initializer" widely in core modules?

2017-01-16 Thread INADA Naoki
Hi. --- This discussion is started in http://bugs.python.org/issue29259, and there is separated issue at http://bugs.python.org/issue29260 . But I want to see more comments, before issue 29259 is committed. --- Since Python 3.6, some of C99 features are accepted in PEP 7. "designated

Re: [Python-Dev] Investigating Python memory footprint of one real Web application

2017-01-20 Thread INADA Naoki
On Fri, Jan 20, 2017 at 8:52 PM, Ivan Levkivskyi <levkivs...@gmail.com> wrote: > On 20 January 2017 at 11:49, INADA Naoki <songofaca...@gmail.com> wrote: >> >> * typing may increase memory footprint, through functions >> __attributes__ and abc. >>* Can w

Re: [Python-Dev] Investigating Python memory footprint of one real Web application

2017-01-20 Thread INADA Naoki
On Fri, Jan 20, 2017 at 8:17 PM, Victor Stinner <victor.stin...@gmail.com> wrote: > 2017-01-20 11:49 GMT+01:00 INADA Naoki <songofaca...@gmail.com>: >> Report is here >> https://gist.github.com/methane/ce723adb9a4d32d32dc7525b738d3c31 > > Very interesting

Re: [Python-Dev] Investigating Python memory footprint of one real Web application

2017-01-20 Thread INADA Naoki
> > Moving the refcount out of the PyObject will probably make increfs / > decrefs more costly, and there are a lot of them. We'd have to see > actual measurements if a patch is written, but my intuition is that the > net result won't be positive. > > Regards > > Antoine. I agree with you. But

[Python-Dev] Investigating Python memory footprint of one real Web application

2017-01-20 Thread INADA Naoki
Hi, all. After reading Instagram's blog article [1], I’m thinking about how Python can reduce memory usage of Web applications. My company creating API server with Flask, SQLAlchemy and typing. (sorry, it's closed source). So I can get some data from it's codebase. [1]:

Re: [Python-Dev] Help requested with Python 2.7 performance regression

2017-03-02 Thread INADA Naoki
On Thu, Mar 2, 2017 at 4:07 AM, Antoine Pitrou wrote: > On Wed, 1 Mar 2017 19:58:14 +0100 > Matthias Klose wrote: >> On 01.03.2017 18:51, Antoine Pitrou wrote: >> > As for the high level: what if the training set used for PGO in Xenial >> > has become skewed

Re: [Python-Dev] Python 3.6 dict becomes compact and gets a private version; and keywords become ordered

2016-09-14 Thread INADA Naoki
> > I mean using a compact representation, if not an ordered one. > > I have no particular usecase in mind. As far as I understand the compact > implementation, sets can do it just as well. The original discussion > proposed trying to implement it for sets first. > > Like dict, they would

Re: [Python-Dev] Review request: issue 27350, compact ordered dict

2016-09-08 Thread INADA Naoki
Thank you for all core devs! I'll polish the implementation until 3.6b2. On Fri, Sep 9, 2016 at 6:42 AM, Guido van Rossum <gu...@python.org> wrote: > It's in! Congrats, and thanks for your great work! See longer post by Victor. > > On Sun, Aug 28, 2016 at 12:16 AM, INADA N

Re: [Python-Dev] Python 3.6 dict becomes compact and gets a private version; and keywords become ordered

2016-09-12 Thread INADA Naoki
> From what I understood, Python 3.6 dict got two *different* changes: > > * modify the dict structure to use two tables instead of only one: an > "index" table (the hash table) and a second key/value table > * tune the dict implementation to only append to the key/value table > > The second

Re: [Python-Dev] Python 3.6 dict becomes compact and gets a private version; and keywords become ordered

2016-09-12 Thread INADA Naoki
On Tue, Sep 13, 2016 at 1:35 AM, Guido van Rossum wrote: > Couldn't we use the order in the actual hash table (which IIUC now > contains just indexes into the ordered vector of key/value/hash > structs)? That would probably simulate the pre-3.6 order quite > effectively. Maybe,

Re: [Python-Dev] Python 3.6 dict becomes compact and gets a private version; and keywords become ordered

2016-09-15 Thread INADA Naoki
On Thu, Sep 15, 2016 at 5:57 PM Victor Stinner <victor.stin...@gmail.com> wrote: > 2016-09-15 10:02 GMT+02:00 INADA Naoki <songofaca...@gmail.com>: > > In my environ: > > > > ~/local/python-master/bin/python3 -m timeit -s "d = > > dict.fromkeys(range(

Re: [Python-Dev] Python 3.6 dict becomes compact and gets a private version; and keywords become ordered

2016-09-15 Thread INADA Naoki
> > > Note that this is made at the expense of the 20% slowing down an iteration. > > $ ./python -m timeit -s "d = dict.fromkeys(range(10**6))" -- "list(d)" > Python 3.5: 66.1 msec per loop > Python 3.6: 82.5 msec per loop > > Are two Pythons built with same options? In my environ:

Re: [Python-Dev] Python 3.6 dict becomes compact and gets a private version; and keywords become ordered

2016-09-20 Thread INADA Naoki
On Tue, Sep 20, 2016 at 7:02 PM, INADA Naoki <songofaca...@gmail.com> wrote: > On Tue, Sep 20, 2016 at 6:56 PM, Dima Tisnek <dim...@gmail.com> wrote: >> Totally random thought: >> >> Can lru_cache be simplified to use an ordered dict instead of dict + >> lin

Re: [Python-Dev] Review request: issue 27350, compact ordered dict

2016-08-28 Thread INADA Naoki
int. Thank you! > > -- > --Guido van Rossum (python.org/~guido) -- INADA Naoki <songofaca...@gmail.com> ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.

Re: [Python-Dev] Review request: issue 27350, compact ordered dict

2016-08-27 Thread INADA Naoki
Last call. There are only two weeks until 3.6 beta. Please review it if possible. On Tue, Aug 9, 2016 at 10:12 PM, INADA Naoki <songofaca...@gmail.com> wrote: > Hi, devs. > > I've implemented compact and ordered dictionary [1], which PyPy > implemented in 2015 [2]. > > Si

  1   2   3   4   5   6   >