Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'url:sourceforge': 0.03; 'subject:: [': 0.04; 'expressions': 0.07; 'lookup': 0.09; 'python': 0.11; 'from:addr:torriem': 0.16; 'from:name:michael torrie': 0.16; 'lambda': 0.16; 'msvc,': 0.16; 'subject:type': 0.16; 'subject:which': 0.16; 'url:qt-4': 0.16; 'url:qt-project': 0.16; 'subject:python': 0.16; 'wrote:': 0.18; 'library': 0.18; 'implementing': 0.19; 'later': 0.20; 'subject:] ': 0.20; '>>>': 0.22; 'header:User-Agent:1': 0.23; 'subject:like': 0.24; 'compare': 0.26; 'header:In-Reply-To:1': 0.27; 'went': 0.31; 'code': 0.31; 'piece': 0.31; 'late': 0.35; 'but': 0.35; 'there': 0.35; 'c++': 0.36; 'subject:data': 0.36; 'similar': 0.36; 'url:org': 0.36; 'too': 0.37; 'christian': 0.38; 'implement': 0.38; 'message-id:@gmail.com': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'enough': 0.39; 'system.': 0.39; 'received:org': 0.40; 'charset:windows-1252': 0.65; 'url:templates': 0.84; 'reasoning': 0.91 X-Virus-Scanned: amavisd-new at torriefamily.org Date: Sun, 01 Feb 2015 17:50:56 -0700 From: Michael Torrie User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: [OT] fortran lib which provide python like data type References: <4822a519-5814-433b-88ad-9bea8a2f83e3@googlegroups.com> <3c31aec4-0c0a-4eb9-aff4-e7b7aa76da21@googlegroups.com> <3d3ef587-a62d-4024-964c-0ac8be023ca3@googlegroups.com> <0b8db0f6-75c5-4a8f-a9a5-51fa936b306e@googlegroups.com> <87zj8zf8bv.fsf@elektro.pacujo.net> <871tma406m.fsf@jester.gateway.sonic.net> <8761bmf4gn.fsf@elektro.pacujo.net> <87oapde98u.fsf@elektro.pacujo.net> In-Reply-To: <87oapde98u.fsf@elektro.pacujo.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 22 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1422838273 news.xs4all.nl 2848 [2001:888:2000:d::a6]:42030 X-Complaints-To: abuse@xs4all.nl Path: csiph.com!usenet.pasdenom.info!bete-des-vosges.org!feed.ac-versailles.fr!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Xref: csiph.com comp.lang.python:85035 On 02/01/2015 12:12 PM, Marko Rauhamaa wrote: > Christian Gollwitzer : > >> Am 01.02.15 um 08:58 schrieb Marko Rauhamaa: >>> Qt gave up on C++ when it comes to callbacks ("signals") and went for >>> an apocryphal metacompiler. >> >> Yes, but only because C++ compilers were not good enough when QT came >> out, and later is was too late to change it to a templated system. >> Lookup libsigc++ http://libsigc.sourceforge.net/ which does the same >> using standard C++ and http://qt-project.org/doc/qt-4.8/templates.html >> for a reasoning of QT. >> >> In C++11 (supported by MSVC, g++, clang) there re also lambda expressions > > So please implement this small piece of Python code in C++ so we can > compare the idioms: Honestly with the C++ standard library implementing std::function and std::bind macros, idiomatically it would look very much similar to the Python code you showed.