Haha guess we all have to become quantum physicist! This type of computing is still just a theory, is it not?
I found this to be interesting.. ."First, there’s the question of knowing if it’s even working in the first place. A widely known tenet of quantum mechanics is that merely observing the phenomenon changes the outcome of an event. So, watch a quantum particle, or a qubit, or anything quantum for that matter, and you change its behaviour. That means that it’s actually very difficult to tell if a quantum computer is behaving in the way we’d expect or need it to." *****quoted from http://www.gizmodo.com.au/2013/12/whats-wrong-with-quantum-computing/ On Sat, Dec 14, 2013 at 4:36 AM, <tutor-requ...@python.org> wrote: > Send Tutor mailing list submissions to > tutor@python.org > > To subscribe or unsubscribe via the World Wide Web, visit > https://mail.python.org/mailman/listinfo/tutor > or, via email, send a message with subject or body 'help' to > tutor-requ...@python.org > > You can reach the person managing the list at > tutor-ow...@python.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Tutor digest..." > > > Today's Topics: > > 1. Re: weird lambda expression -- can someone help me understand > how this works (Steven D'Aprano) > 2. Quantum computing (David Hutto) > 3. Re: Tutor Digest, Vol 118, Issue 62 (Keith Winston) > 4. Re: list comprehension equivalent to map(function, list item) > (Bo Morris) > 5. Re: weird lambda expression -- can someone help me understand > how this works (Alan Gauld) > 6. Re: Quantum computing (Alan Gauld) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Sat, 14 Dec 2013 15:21:45 +1100 > From: Steven D'Aprano <st...@pearwood.info> > To: tutor@python.org > Subject: Re: [Tutor] weird lambda expression -- can someone help me > understand how this works > Message-ID: <20131214042144.GP29356@ando> > Content-Type: text/plain; charset=us-ascii > > On Sat, Dec 14, 2013 at 12:29:54PM +1000, Amit Saha wrote: > > > Consider this simple example: > > > > >>> l = lambda x: x**2 > > >>> apply(l, (3,)) > > 9 > > The built-in function apply is deprecated in Python 2 and removed in > Python 3. Instead apply, you should use argument unpacking: > > l(*(3,)) > > In this case, it's silly to unpack a tuple of a single value, instead > you should just do this: > > l(3) > > > -- > Steven > > > ------------------------------ > > Message: 2 > Date: Fri, 13 Dec 2013 23:36:37 -0500 > From: David Hutto <dwightdhu...@gmail.com> > To: "tutor@python.org" <tutor@python.org> > Subject: [Tutor] Quantum computing > Message-ID: > < > ca+vvgjw63imaqsp52+ererkvztcpm55i+ri68xoicpcje_n...@mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > Recently, after having some personal problems, I've returned to looking at > the future of not only prototyping languages like python, but also the more > advanced/older(refinement of your computers resources) languages. > > > My main question/topic, is what is to become of languages like python with > the emergence of quantum computing? > > How will python evolve to meet the needs of these newr technologies > intertwining into the marketplace? > > We know the richest get it first, but how do we begin to even simulate, and > evolve to meet the needs of tomorrows world of advanced computing, and will > the instruction sets of these newer technologies effect us considerably? > > Just to kick off a topic. > -- > Best Regards, > David Hutto > *CEO:* *http://www.hitwebdevelopment.com <http://www.hitwebdevelopment.com > >* > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mail.python.org/pipermail/tutor/attachments/20131213/cd7a9eef/attachment-0001.html > > > > ------------------------------ > > Message: 3 > Date: Fri, 13 Dec 2013 23:25:28 -0500 > From: Keith Winston <keithw...@gmail.com> > To: tutor@python.org > Subject: Re: [Tutor] Tutor Digest, Vol 118, Issue 62 > Message-ID: > <CAO5ffbbPE7aTbwVXye9oUX0ntDsa== > fcdk5pz3n4b_x3xp+...@mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > > > > Message: 6 > > Date: Thu, 12 Dec 2013 23:10:31 -0500 > > From: Sky blaze <skyblaze...@gmail.com> > > To: tutor@python.org > > Subject: [Tutor] Coding for a Secret Message in a Game > > > > > > it'd be amusing to have the message change after the player types > something > > other than "start" at least 10 times. I've attempted numerous times to > code > > this, but all of them have failed. Could you help me with the coding? It > > should look something like this in the end: > > > > > > while start != True: #Infinite loop that doesn't end until "start" is > typed > > if start_prompt == "start": > > start = True #Continues from the title screen > > else: > > #This is where I'm stuck. I can loop it so it always returns the > > command message when > > #"start" isn't typed, but changing the message upon having that > > occur at least 10 times is > > #what's giving me trouble > > > > Probably smarter people than I will have better ideas, but if you make your > else an elif and use an expression something like > *** counter = 0 # somewhere before the while > elif counter < 10: > counter += 1 > print("type start") > else > print("just do it") > that should (roughly) do it, unless I'm misunderstanding. Good luck! > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mail.python.org/pipermail/tutor/attachments/20131213/18d76856/attachment-0001.html > > > > ------------------------------ > > Message: 4 > Date: Sat, 14 Dec 2013 04:12:20 -0500 > From: Bo Morris <crushe...@gmail.com> > To: Amit Saha <amitsaha...@gmail.com> > Cc: "tutor@python.org" <tutor@python.org> > Subject: Re: [Tutor] list comprehension equivalent to map(function, > list item) > Message-ID: > < > cakkcnfd9+atpkip-vfn8cwxshdfcnzhkx-b_am7jzufsk_x...@mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > Thank you for your assistance. Based on your direction, I figured it out. > > *This... * > > def add(number): > print 1 + int(number) > > x = ['2', '4', '6', '8', '10', '12'] > > [add(item) for item in x] > > *Is the same as... * > > > def add(number): > print 1 + int(number) > > x = ['2', '4', '6', '8', '10', '12'] > > map(add, x) > > They both yield the same results. Is there a benefit to using one way over > the other? In larger computations, does one way calculate faster or is it > merely a preference? Again, thank you. > > AngryNinja > > > On Fri, Dec 13, 2013 at 9:24 PM, Amit Saha <amitsaha...@gmail.com> wrote: > > > On Sat, Dec 14, 2013 at 11:03 AM, Bo Morris <crushe...@gmail.com> wrote: > > > i have the following simple function that iterates over the list. It > > passes > > > the list item into the function and adds the numbers. What would be the > > > equivalent way of writing the "map" portion with list comprehension? My > > code > > > is as follows: > > > > > > def add(number): > > > print 1 + int(number) > > > > > > > > > > > > x = ['2', '4', '6', '8', '10', '12'] > > > > > > map(add, x) > > > > Think of a list comprehension as: > > > > [ dosomething(item) for item in alist] > > > > And, comparing it with your map implementation, here is what you get: > > > > >>> [1+int(item) for item in x] > > [3, 5, 7, 9, 11, 13] > > > > > > Here, dosomething(item) corresponds to 1+int(item). > > > > Hope that helps. > > > > -Amit. > > > > > > -- > > http://echorand.me > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mail.python.org/pipermail/tutor/attachments/20131214/1c4329cf/attachment-0001.html > > > > ------------------------------ > > Message: 5 > Date: Sat, 14 Dec 2013 09:27:17 +0000 > From: Alan Gauld <alan.ga...@btinternet.com> > To: tutor@python.org > Subject: Re: [Tutor] weird lambda expression -- can someone help me > understand how this works > Message-ID: <l8h89a$p0i$1...@ger.gmane.org> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > On 14/12/13 04:19, Steven D'Aprano wrote: > > > Lambda is just syntactic sugar for a function. It is exactly the same as > > a def function, except with two limitations: > > > > - there is no name, or to be precise, the name of all lambda functions > > is the same, "<lambda>"; > > Sorry, I don't think that is precise. lambda is not the name of the > function. You can't use lambda to access the function(s) or treat it > like any other kind of name in Python. In fact if you try to use it as a > name you'll likely get a syntax error. > > lambda is the key word that defines the function. But its no more > the name of the function than def is. > > > -- > Alan G > Author of the Learn to Program web site > http://www.alan-g.me.uk/ > http://www.flickr.com/photos/alangauldphotos > > > > ------------------------------ > > Message: 6 > Date: Sat, 14 Dec 2013 09:36:14 +0000 > From: Alan Gauld <alan.ga...@btinternet.com> > To: tutor@python.org > Subject: Re: [Tutor] Quantum computing > Message-ID: <l8h8q3$u3c$1...@ger.gmane.org> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > On 14/12/13 04:36, David Hutto wrote: > > > My main question/topic, is what is to become of languages like python > > with the emergence of quantum computing? > > Nothing, I suspect, since by the time quantum computing hits the > mainstream we will all have progressed to other languages anyhow. > > These kinds of breakthrough take decades to reach maturity. QC has > been around conceptually for 30 years and there is still no > commercial QC hardware available (so far as I know). When/if > it does appear it will be in the mainframe/supercomputing arena > first and then it may percolate down to mid size and personal > computers. > > But I'm sceptical. QC may have a role in the medium term but it > will be in niche areas I suspect. > > I remember being shown a computer in a petri dish while at Uni' and > being told that biological computing was the future. It has never > happened. Similarly the transputer (real commerial hardware) was > heralded as the dawn of massive parallel computing in the late '80s. > Instead we got multi-core CPUs and blades and Google... > > > -- > Alan G > Author of the Learn to Program web site > http://www.alan-g.me.uk/ > http://www.flickr.com/photos/alangauldphotos > > > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > Tutor maillist - Tutor@python.org > https://mail.python.org/mailman/listinfo/tutor > > > ------------------------------ > > End of Tutor Digest, Vol 118, Issue 69 > ************************************** >
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor