Re: Question about math.pi is mutable

2015-11-08 Thread Ben Finney
BartC <b...@freeuk.com> writes: > On 08/11/2015 21:00, Ben Finney wrote: > > The namespace can change dynamically, which is another way of what > > people have been trying to tell you all through this thread. > > > > The compiler *cannot* know what the names

Re: Question about math.pi is mutable

2015-11-07 Thread Ben Finney
sence of science: Ask an impertinent question, | `\and you're on the way to the pertinent answer.” —Jacob | _o__) Bronowski, _The Ascent of Man_, 1973 | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Question about math.pi is mutable

2015-11-07 Thread Ben Finney
Bartc <b...@freeuk.com> writes: > On 07/11/2015 03:43, Ben Finney wrote: > > Bartc <b...@freeuk.com> writes: > > > >> Is there no way then in Python to declare: > >> > >> pi = 3.141519 # etc > >> > >> and make it impo

Re: Question about math.pi is mutable

2015-11-07 Thread Ben Finney
to mean. I recommend you ignore that request; “Bartc” is fine as a name here, IMO. -- \“Your [government] representative owes you, not his industry | `\ only, but his judgment; and he betrays, instead of serving you, | _o__)if he sacrifices it to your opinion.” —Edmund Bu

Re: Question about math.pi is mutable

2015-11-06 Thread Ben Finney
o change that binding, the library author has no business forbidding that. -- \ “Software patents provide one more means of controlling access | `\ to information. They are the tool of choice for the internet | _o__) highwayman.” —Anthony Taylor |

Re: Regular expressions

2015-11-04 Thread Ben Finney
To think and not study is dangerous.) | _o__)—孔夫子 Confucius (551 BCE – 479 BCE) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Regular expressions

2015-11-04 Thread Ben Finney
| _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

What does “grep” stand for? (was: Regular expressions)

2015-11-04 Thread Ben Finney
beats Ed, man! !man ed [0] The standard text editor. <URL:https://www.gnu.org/fun/jokes/ed-msg.txt> -- \ “If you can't annoy somebody there is little point in writing.” | `\—Kingsley Amis | _o__)

Re: Python PNG Viewer(Browser Based)

2015-11-03 Thread Ben Finney
wledge about web frameworks. Good hunting! -- \ “Ridicule is the only weapon which can be used against | `\ unintelligible propositions.” —Thomas Jefferson, 1816-07-30 | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: need help understanding a python program

2015-11-02 Thread Ben Finney
y: “Forty thousand million billion dollars? That money | `\must be worth a fortune!” —The Goon Show, _The Sale of | _o__) Manhattan_ | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 2 vs Python 3 for teaching

2015-11-01 Thread Ben Finney
ken in our view of | `\ what exists, given that theories often change under pressure | _o__) from further investigation.” —Thomas W. Clark, 2009 | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Problem in implementing Romania Map using Paython Script

2015-11-01 Thread Ben Finney
t I will defend to the | `\death your right to mis-attribute this quote to Voltaire.” | _o__) —Avram Grumer, rec.arts.sf.written, 2000-05-30 | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: How to make this simple code look better

2015-10-27 Thread Ben Finney
ohn Kenneth Galbraith, _Money: Whence It | _o__) Came, Where It Went_, 1975 | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Ignore stderr and use return code

2015-10-26 Thread Ben Finney
- \ “When people believe that they have absolute knowledge, with no | `\ test in reality, this [the Auschwitz crematorium] is how they | _o__) behave.” —Jacob Bronowski, _The Ascent of Man_, 1973 | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Please post “text/plain” message body (was: Best way to do background calculations?)

2015-10-25 Thread Ben Finney
Umm, I think | `\ so, Brain, but three men in a tub? Ooh, that's unsanitary!” | _o__) —_Pinky and The Brain_ | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: OT snake_case

2015-10-25 Thread Ben Finney
you have references for tracing the origin of that term? -- \ “You can be a theist, and you can be a skeptic. But if you're | `\ both, you're not very good at one of them.” —Dave Silverman, | _o__) 2011-11-19 | Ben Finney -- https://m

What does it mean for Python to have “constants”? (was: variable scope of class objects)

2015-10-20 Thread Ben Finney
it breeds contempt for the law.” —Justice Louis Brandeis | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Stylistic question regarding no-op code and tests

2015-10-14 Thread Ben Finney
berty to obtain a little | `\temporary safety, deserve neither liberty nor safety.” | _o__) —Benjamin Franklin, 1775-02-17 | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

[issue25392] setup.py --quiet doesn't silence "no previously-included directories" warnings from MANIFEST.in

2015-10-13 Thread Ben Finney
Changes by Ben Finney <ben+pyt...@benfinney.id.au>: -- nosy: +bignose ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25392> ___ _

Re: Strong typing implementation for Python

2015-10-12 Thread Ben Finney
`\ for democracy.” —Carl Sagan | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 2.2 or 3.5

2015-10-11 Thread Ben Finney
oogle showed me” is irrelevant. -- \“The idea that He would take his attention away from the | `\ universe in order to give me a bicycle with three speeds is | _o__) just so unlikely that I can't go along with it.” —Quentin Crisp | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Static typing implementation for Python

2015-10-11 Thread Ben Finney
Random832 <random...@fastmail.com> writes: > Ben Finney <ben+pyt...@benfinney.id.au> writes: > > The opposite of string typing is weak typing. > > Well, I would say *string* typing [as used in, for example, sh and tcl] > is actually a form of weak typing.

Static typing implementation for Python (was: Strong typing implementation for Python)

2015-10-10 Thread Ben Finney
without losing any of the power of dynamic typing. -- \ “When cryptography is outlawed, bayl bhgynjf jvyy unir | `\ cevinpl.” —Anonymous | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: doc-generation tool

2015-10-06 Thread Ben Finney
API documentation, or end-user documentation? -- \ “I still have my Christmas Tree. I looked at it today. Sure | `\ enough, I couldn't see any forests.” —Steven Wright | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 2 ‘print’, coercing arguments to Unicode

2015-10-06 Thread Ben Finney
average American family | _o__) hasn't time for it.” —_The New York Times_, 1939 | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Python 2 ‘print’, coercing arguments to Unicode

2015-10-06 Thread Ben Finney
t products is like being a non-smoker 40 or | `\ 50 years ago: You can choose not to smoke, yourself, but it's | _o__) hard to avoid second-hand smoke.” —Michael Tiemann | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 2 ‘print’, coercing arguments to Unicode

2015-10-06 Thread Ben Finney
Terry Reedy <tjre...@udel.edu> writes: > On 10/6/2015 6:45 AM, Ben Finney wrote: > > Ben Finney <ben+pyt...@benfinney.id.au> writes: > > > How can I convince ‘print’, everywhere throughout a module, that it > > should coerce its arguments using ‘unicode’? >

Re: Python 2 ‘print’, coercing arguments to Unicode

2015-10-06 Thread Ben Finney
fter he hath killed hath power to cast into | `\ hell; yea, I say unto you, Fear him.” –Jesus, as quoted in Luke | _o__) 12:5 | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 2 ‘print’, coercing arguments to Unicode

2015-10-06 Thread Ben Finney
Ben Finney <ben+pyt...@benfinney.id.au> writes: > In Python 2.7, I am seeing this behaviour for ‘print’:: > > Python 2.7.10 (default, Sep 13 2015, 20:30:50) > [GCC 5.2.1 20150911] on linux2 > Type "help", "copyright", "credits"

Re: Pyarmor, guard your python scripts

2015-10-05 Thread Ben Finney
n.” —Aahz | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Idiosyncratic python

2015-09-24 Thread Ben Finney
t astonishing fact | `\you'll ever have to confront. Don't dare ever see your life as | _o__)boring, monotonous, or joyless.” —Richard Dawkins, 2010-03-10 | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Pyarmor, guard your python scripts

2015-09-18 Thread Ben Finney
grams on their own computers. -- \ “It ain't so much the things we don't know that get us in | `\trouble. It's the things we know that ain't so.” —Artemus Ward | _o__) (1834–1867), U.S. journalist | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Pyarmor, guard your python scripts

2015-09-17 Thread Ben Finney
_) hopes of its children.” —Dwight Eisenhower, 1953-04-16 | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Automating build from source (was: Automating Sphinx generated documentation)

2015-09-17 Thread Ben Finney
e like us, we will squander | `\ the great opportunity before us: To live together peacefully in | _o__)a world of unresolved differences.” —David Weinberger | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Pyarmor, guard your python scripts

2015-09-17 Thread Ben Finney
Faith_, 2004 | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Terminology: "reference" versus "pointer"

2015-09-16 Thread Ben Finney
ll] maintain the status quo, | `\ or die trying. Either is better than actually WORKING for a | _o__) living.” —ringsnake.livejournal.com, 2007-11-12 | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Pyarmor, guard your python scripts

2015-09-15 Thread Ben Finney
n, and I hope I misunderstand Pyarmor's operation. -- \ “Any fool can write code that a computer can understand. Good | `\ programmers write code that humans can understand.” —Martin | _o__) Fowler, _Refactoring_, 2000 | Ben Finney -- https://

Re: Putting the main program in a main function

2015-09-14 Thread Ben Finney
is pattern <URL:http://www.artima.com/weblogs/viewpost.jsp?thread=4829>, mine is a small refinement of that. -- \ “It is the fundamental duty of the citizen to resist and to | `\ restrain the violence of the state.” —Noam Chomsky, 1971 | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Terminology: "reference" versus "pointer"

2015-09-13 Thread Ben Finney
nt them unprompted. -- \ “I call him Governor Bush because that's the only political | `\ office he's ever held legally.” —George Carlin, 2008 | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Terminology: "reference" versus "pointer"

2015-09-12 Thread Ben Finney
Rustom Mody <rustompm...@gmail.com> writes: > On Saturday, September 12, 2015 at 11:57:01 AM UTC+5:30, Ben Finney wrote: > > You've clearly committed to some ontology that just doesn't match > > the Python data model. > > How about lay-English ontology in

Re: Terminology: "reference" versus "pointer"

2015-09-12 Thread Ben Finney
g. -- \ “I have always wished for my computer to be as easy to use as | `\ my telephone; my wish has come true because I can no longer | _o__) figure out how to use my telephone.” —Bjarne Stroustrup | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Terminology: “reference” versus “pointer”

2015-09-12 Thread Ben Finney
Random832 <random...@fastmail.com> writes: > Ben Finney <ben+pyt...@benfinney.id.au> writes: > > The reference value is inaccessible to the program, it can only be > > used to get at the referenced object. > > What does it mean to access something, if not to d

Re: Terminology: “reference” versus “pointer”

2015-09-11 Thread Ben Finney
Random832 <random...@fastmail.com> writes: > Ben Finney <ben+pyt...@benfinney.id.au> writes: > > With the significant difference that “pointer” implies that it has its > > own value accessible directly by the running program, such as a pointer > > in C. &

Re: Terminology: “reference” versus “pointer”

2015-09-11 Thread Ben Finney
Random832 <random...@fastmail.com> writes: > Ben Finney <ben+pyt...@benfinney.id.au> writes: > > > Random832 <random...@fastmail.com> writes: > > > >> Ben Finney <ben+pyt...@benfinney.id.au> writes: > >> > With the significant dif

Terminology: “reference” versus “pointer” (was: Python handles globals badly.)

2015-09-11 Thread Ben Finney
inct value; you can only use them to refer to the object at the other end. -- \ “If we don't believe in freedom of expression for people we | `\ despise, we don't believe in it at all.” —Noam Chomsky, | _o__) 1992-1

Re: Context-aware return

2015-09-10 Thread Ben Finney
e*, then I'll know you are sent to us as an evil spirit to make all software suck. -- \ “Nothing exists except atoms and empty space; everything else | `\ is opinion.” —Democritus | _o__)

Re: Context-aware return

2015-09-10 Thread Ben Finney
question he did ask? -- \ “The optimist thinks this is the best of all possible worlds. | `\ The pessimist fears it is true.” —J. Robert Oppenheimer | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Reply to author, reply to list, reply to all (was: Need Help w. PIP!)

2015-09-09 Thread Ben Finney
> Please no, not as a routine. Agreed. -- \ “Anyone who puts a small gloss on [a] fundamental technology, | `\ calls it proprietary, and then tries to keep others from | _o__) building on it, is a thief.” —Tim O'Reilly, 2000-01-25 | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Reply to author, reply to list, reply to all

2015-09-09 Thread Ben Finney
“Anyone who believes exponential growth can go on forever in a | `\finite world is either a madman or an economist.” —Kenneth | _o__) Boulding | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Reply to author, reply to list, reply to all

2015-09-09 Thread Ben Finney
an subscribe using a non-email method such as NNTP. -- \ “Courage is not the absence of fear, but the decision that | `\ something else is more important than fear.” —Ambrose Redmoon | _o__) | Ben Finney -- https:/

Re: Lesson 39 of Learning Python the Hard Way hangs

2015-09-09 Thread Ben Finney
e’ also owns a | `\ broadcasting station. These ‘targets’ can shoot back.” —Michael | _o__) Rathbun to advertisers, news.admin.net-abuse.email | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Python handles globals badly.

2015-09-08 Thread Ben Finney
their bedrooms is the new radio.” —Neil Young, 2008-05-06 | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Python handles globals badly.

2015-09-08 Thread Ben Finney
Mario Figueiredo <mar...@gmx.com> writes: > On 09-09-2015 02:26, Ben Finney wrote: > > Mario Figueiredo <mar...@gmx.com> writes: > > > >> You know, it is a pointless exercise to try and downplay > >> programming languages (any programming lang

Re: Why Python is not both an interpreter and a compiler?

2015-08-31 Thread Ben Finney
ne into a single executable file – is quite useful. -- \“Some people, when confronted with a problem, think ‘I know, | `\ I'll use regular expressions’. Now they have two problems.” | _o__) —Jamie Zawinski, in alt.religion.emacs | Ben Finney -- http

Re: Hi am new to python

2015-08-31 Thread Ben Finney
hich is specialised to help beginners in Python. -- \ “Reichel's Law: A body on vacation tends to remain on vacation | `\unless acted upon by an outside force.” —Carol Reichel | _o__) | Ben Finney -- https://mail.

Re: Why Python is not both an interpreter and a compiler?

2015-08-31 Thread Ben Finney
f a single petitioner confessedly unworthy.” —Ambrose | _o__) Bierce, _The Devil's Dictionary_, 1906 | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

[RELEASE] ‘python-daemon’ version 2.0.6 released

2015-08-30 Thread Ben Finney
a well-behaved Unix daemon process. -- \ “One time I went to a drive-in in a cab. The movie cost me | `\ ninety-five dollars.” —Steven Wright | _o__) | Ben Finney b...@benfinney.id.au -- https

Re: TypeError: unhashable type: 'dict' when attempting to hash list - advice sought

2015-08-29 Thread Ben Finney
(key, ) for key in input_record] writer.writerow(output_record) -- \ “An idea isn't responsible for the people who believe in it.” | `\ —Donald Robert Perry Marquis | _o__) | Ben

Re: OFF-TOPIC Ben's sig monster quote [was Re: Parametrized Unit Tests]

2015-08-28 Thread Ben Finney
the war they create. -- \ “Capitalism is the astounding belief that the most wickedest of | `\men will do the most wickedest of things for the greatest good | _o__) of everyone.” —John Maynard Keynes | Ben Finney -- https://mail.python.org/mailman/listinfo

Re: Casting to a number (both int and float)?

2015-08-27 Thread Ben Finney
that should result in a ‘float’ instance? -- \ “I'm a great lover, I'll bet.” —Emo Philips | `\ | _o__) | Ben Finney -- https

Re: Parametrized Unit Tests

2015-08-27 Thread Ben Finney
rambius rambiusparkisan...@gmail.com writes: Hello, петък, 21 август 2015 г., 21:43:19 UTC-4, Ben Finney написа: The ‘testscenarios’ library is one way to have a set of scenarios applied at run-time to produce tests across all combinations URL:https://pypi.python.org/pypi/testscenarios

Please don't make unfounded legalistic demands (was: [a, b, c, d] = 1, 2, 3, 4)

2015-08-26 Thread Ben Finney
instrument: all you have to do | `\ is touch the right key at the right time and the instrument | _o__)will play itself.” —Johann Sebastian Bach | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Please don't make unfounded legalistic demands

2015-08-26 Thread Ben Finney
because they | _o__) couldn't see the lake.” —Steven Wright | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: required help with python code.

2015-08-25 Thread Ben Finney
) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Sometimes bottle takes a lot of time

2015-08-23 Thread Ben Finney
. -- \“Technology is neither good nor bad; nor is it neutral.” | `\ —Melvin Kranzberg's First Law of Technology | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Parametrized Unit Tests

2015-08-21 Thread Ben Finney
) goes downhill from there.” —Will Larson, 2008-11-04 | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: AttributeError

2015-08-15 Thread Ben Finney
. -- \ “Alternative explanations are always welcome in science, if | `\ they are better and explain more. Alternative explanations that | _o__) explain nothing are not welcome.” —Victor J. Stenger, 2001-11-05 | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Ensure unwanted names removed in class definition

2015-08-13 Thread Ben Finney
Peter Otten __pete...@web.de writes: Ben Finney wrote: Peter Otten __pete...@web.de writes: That's an unexpected inconsistency between list comprehensions versus generator expressions, then. Is that documented explicitly in the Python 2 documentation? https://docs.python.org/2.4

Re: Mock object but also assert method calls?

2015-08-13 Thread Ben Finney
) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Ensure unwanted names removed in class definition

2015-08-12 Thread Ben Finney
) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Ensure unwanted names removed in class definition

2015-08-12 Thread Ben Finney
there.” —Robert Frost | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Ensure unwanted names removed in class definition

2015-08-12 Thread Ben Finney
| `\ so, but *where* do you stick the feather and call it macaroni?” | _o__) —_Pinky and The Brain_ | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Linux users: please run gui tests

2015-08-06 Thread Ben Finney
Propaganda_, 1928 | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Test doubles for Python standard library HTTP classes

2015-08-06 Thread Ben Finney
contents.” —Howard Philips | _o__)Lovecraft | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Who uses IDLE -- please answer if you ever do, know, or teach

2015-08-05 Thread Ben Finney
and collect the responses if so. -- \ “The Stones, I love the Stones; I can't believe they're still | `\ doing it after all these years. I watch them whenever I can: | _o__)Fred, Barney, ...” —Steven Wright | Ben Finney -- https://mail.python.org/mailman

Re: Most Pythonic way to store (small) configuration

2015-08-04 Thread Ben Finney
to be much use | `\ being anything else.” —Winston Churchill, 1954-11-09 | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Most Pythonic way to store (small) configuration

2015-08-02 Thread Ben Finney
it. -- \ “Simplicity and elegance are unpopular because they require | `\ hard work and discipline to achieve and education to be | _o__)appreciated.” —Edsger W. Dijkstra | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Most Pythonic way to store (small) configuration

2015-08-02 Thread Ben Finney
Cecil Westerhof ce...@decebal.nl writes: On Sunday 2 Aug 2015 13:54 CEST, Ben Finney wrote: So, both XML and JSON should be considered write-only, and produced only for consumption by a computer; they are a poor choice for presenting to a human. Well, I would use nested data. (A file

Re: debugging during package development

2015-07-31 Thread Ben Finney
think it would be a good idea.” —Mohandas K. Gandhi (when | `\asked what he thought of Western civilization) | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Gmail eats Python

2015-07-25 Thread Ben Finney
| `\to you?’” —Emo Philips | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Gmail eats Python

2015-07-25 Thread Ben Finney
, there are better alternatives (including avoiding GMail entirely). -- \ “If I had known what it would be like to have it all... I might | `\ have been willing to settle for less.” —Jane Wagner, via Lily | _o__) Tomlin | Ben Finney

Re: unexpected output while using list(and nested dictionary)

2015-07-23 Thread Ben Finney
and very much worth your while :-) -- \ “If you always want the latest and greatest, then you have to | `\ buy a new iPod at least once a year.” —Steve Jobs, MSNBC | _o__) interview 2006-05-25 | Ben Finney -- https://mail.python.org

Re: Integers with leading zeroes

2015-07-22 Thread Ben Finney
. -- \“Simplicity is prerequisite for reliability.” —Edsger W. | `\ Dijkstra | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: unexpected output while using list(and nested dictionary)

2015-07-22 Thread Ben Finney
Gilliam, 2005-01-18 | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

[issue24651] Mock.assert* API is in user namespace

2015-07-21 Thread Ben Finney
Changes by Ben Finney ben+pyt...@benfinney.id.au: -- nosy: +bignose ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24651 ___ ___ Python-bugs-list

Re: Mapping, with sequence as key, wildcard and subsequence matching

2015-07-16 Thread Ben Finney
Terry Reedy tjre...@udel.edu writes: On 7/15/2015 9:51 PM, Ben Finney wrote: What well-defined data type exists with the following properties: * Mapping, key → value. * Each key is a sequence (e.g. `tuple`) of items such as text strings. * Items in a key may be the sentinel `ANY

Re: Mapping, with sequence as key, wildcard and subsequence matching

2015-07-16 Thread Ben Finney
sold to the masses | `\over generations, the truth will seem utterly preposterous and | _o__)its speaker a raving lunatic.” —Dresden James | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Mapping, with sequence as key, wildcard and subsequence matching

2015-07-16 Thread Ben Finney
Ethan Furman et...@stoneleaf.us writes: On 07/15/2015 10:53 PM, Ben Finney wrote: Are those the ‘__contains__’, ‘__getitem__’ methods? What actually is the API of a mapping type, that would need to be customised for this application? The problem is that potential key matches are found

Re: Mapping, with sequence as key, wildcard and subsequence matching

2015-07-16 Thread Ben Finney
Zachary Ware zachary.ware+pyl...@gmail.com writes: On Thu, Jul 16, 2015 at 1:31 AM, Ben Finney ben+pyt...@benfinney.id.au wrote: Fine by me. What is the mapping API that needs to be implemented though? Have a look at collections.MutableMapping. Thank you, that's great! I hadn't realised

Mapping, with sequence as key, wildcard and subsequence matching

2015-07-15 Thread Ben Finney
use? -- \ “I am too firm in my consciousness of the marvelous to be ever | `\ fascinated by the mere supernatural …” —Joseph Conrad, _The | _o__) Shadow-Line_ | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Mapping, with sequence as key, wildcard and subsequence matching

2015-07-15 Thread Ben Finney
? -- \ “If we listen only to those who are like us, we will squander | `\ the great opportunity before us: To live together peacefully in | _o__)a world of unresolved differences.” —David Weinberger | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Foo.__new__ is what species of method?

2015-07-13 Thread Ben Finney
is a class method …”. Am I wrong? -- \“Cooles Heates: If you want just condition of warm in your | `\room, please control yourself.” —air conditioner instructions, | _o__)Japan | Ben Finney -- https://mail.python.org

Re: Foo.__new__ is what species of method?

2015-07-13 Thread Ben Finney
a different | _o__) ‘impression’, so what, can't we all be brothers?” —Jack Handey | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: understanding why there is no setup.py uninstall

2015-07-06 Thread Ben Finney
because I kept | `\ locking the keys in the plane. They caught me on an 80 foot | _o__)stepladder with a coathanger.” —Steven Wright | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Looking up a dictionary _key_ by key?

2015-06-23 Thread Ben Finney
as a collection. -- \ “Capitalism has destroyed our belief in any effective power but | `\ that of self interest backed by force.” —George Bernard Shaw | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Looking up a dictionary _key_ by key?

2015-06-23 Thread Ben Finney
Dan Stromberg drsali...@gmail.com writes: On Tue, Jun 23, 2015 at 5:33 PM, Ben Finney ben+pyt...@benfinney.id.au wrote: Dan Stromberg drsali...@gmail.com writes: Is there a way of getting the key used by the dictionary, short of storing a reference to it in the value, or using a second

Re: instance as module

2015-06-19 Thread Ben Finney
not believe in forgiveness as it is preached by the | `\church. We do not need the forgiveness of God, but of each | _o__)other and of ourselves.” —Robert G. Ingersoll | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Documenting a function signature

2015-06-18 Thread Ben Finney
Laura Creighton l...@openend.se writes: In a message of Thu, 18 Jun 2015 10:04:46 +1000, Ben Finney writes: Since the introduction of keyword-only arguments in Python functions, the question arises of how to communicate this in documentation. I suppose it is way too late to scream I hate

Documenting a function signature (was: Set a flag on the function or a global?)

2015-06-17 Thread Ben Finney
) 1935 | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Set a flag on the function or a global?

2015-06-15 Thread Ben Finney
instrument: all you have to do | `\ is touch the right key at the right time and the instrument | _o__)will play itself.” —Johann Sebastian Bach | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

<    3   4   5   6   7   8   9   10   11   12   >