s to treat it no differently from other fuzzy
searches. A good search engine should be tolerant of spelling errors and
alternative spellings for any letter, not just those with diacritics.
Ideally, a good search engine would successfully match all three of
"naïve", "naive" a
ding unwanted GG
posts outweighs the risk of throwing out a useful post or two.
Isn't freedom of choice wonderful? No matter what you choose, you'll
annoy somebody, possibly yourself :-)
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
r made out to the solicitors Hummerdinger,
Hummerdinger, Hummerdinger, Hummerdinger, and McCormack? As I recall, not
only did the secretary leave out one of the Hummerdingers, but he left
out the most important one.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
On Tue, 29 Oct 2013 08:53:08 +, Duncan Booth wrote:
> Steven D'Aprano wrote:
>
>> Does anyone here use slices (or range/xrange) with negative strides
>> other than -1?
>>
>> E.g. sequence[2:15:-3]
>
> With any negative stride your example is just t
a bit
until the button exists
click the button
> Putting this exit condition on the top makes no sense.
Wait until you actually start programming before deciding what makes
sense or doesn't.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
On Tue, 29 Oct 2013 13:00:07 -0700, rurpy wrote:
> On Tuesday, October 29, 2013 8:08:16 AM UTC-6, Steven D'Aprano wrote:
>> On Tue, 29 Oct 2013 12:37:36 +0100, Skybuck Flying wrote:
>>[...]
>> Skybuck, please excuse my question, but have you ever done any
>> progr
Showing results for misspelled
Search instead for mispealled
But I see now that this is nonsense and there is *absolutely no reason*
to match something other than the ecaxt wrods I typed.
Perhaps you should submit a bug report to Google:
"When I mistype a word, Google co
On Wed, 30 Oct 2013 19:48:55 -0700, rurpy wrote:
> On 10/30/2013 04:22 AM, Steven D'Aprano wrote:
>> Skybuck's experience at programming *is relevant* to the question of
>> whether or not he understands what he is talking about.
>
> No. You claimed his propositio
On Thu, 31 Oct 2013 21:41:32 -0700, rurpy wrote:
> On 10/31/2013 02:41 AM, Steven D'Aprano wrote:
>> On Wed, 30 Oct 2013 19:48:55 -0700, rurpy wrote:
>>> On 10/30/2013 04:22 AM, Steven D'Aprano wrote:
>>>> Skybuck's experience at programming *is releva
27;s service at any time, or at least at any time within pre-
defined boundaries (even servants get days off), and that he would have
no right to refuse service. But that's not the case. He is a volunteer
who is free to say No at any time, and the quickest way to get him to say
No would be to treat him as a servant.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
On Thu, 31 Oct 2013 03:33:15 -0700, wxjmfauth wrote:
> Le jeudi 31 octobre 2013 08:10:18 UTC+1, Steven D'Aprano a écrit :
>> I'm glad that you know so much better than Google, Bing, Yahoo, and
>> other
>> search engines. When I search for "mispealled" Goo
are simply wrong.
This is four posts in a row now that you have wrongly represented me. I
can only conclude that you think that by repeating a lie often enough,
you'll convince others that it must be true and "win". I will no longer
play this game with you. Goodbye.
*plonk*
--
S
application itself. Then, if
you just look at the compressed file (the "data.zip" equivalent, although
I stress that zip compression is *not* like this), you might think it has
shrunk quite a lot. But when you include the hidden data, the compression
is not quite so impressive...
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
email and ever more pedantic arguments about the
precise wording. Even when all participants are arguing in good faith,
they risk becoming quagmires which go nowhere in dozens of posts.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
ike this, the question of how to use variables across modules is
irrelevant. The right answer to the question "What's the best way to
manage global variables across modules?" is "Don't".
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
t; to O(1) somehow (usually with lazy eval). So the implementation should
> drive the property or not decision.
I think that is reasonable.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
y.blogspot.com.au/2011/06/speeding-up-python-numpy-cython-and.html
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
On Mon, 04 Nov 2013 00:15:40 +0100, Martin Manns wrote:
> On 29 Oct 2013 05:22:00 GMT
> Steven D'Aprano wrote:
>
>> Does anyone here use slices (or range/xrange) with negative strides
>> other than -1?
>
> I have used negative strides for comparing discrete
othing to do with "n". But in case you actually meant "i", again you
are mistaken. i is a symbolic name for an exact number.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
On Tue, 05 Nov 2013 04:33:46 +, Steven D'Aprano wrote:
> On Mon, 04 Nov 2013 14:34:23 -0800, jonas.thornvall wrote:
>
>> Den måndagen den 4:e november 2013 kl. 15:27:19 UTC+1 skrev Dave Angel:
>>> On Mon, 4 Nov 2013 05:53:28 -0800 (PST), jonas.tho
ive
interpreter:
type() # replace the stars with the object
and see what is printed.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
"myfile" is (although sometimes you can
make a good prediction: "my holiday picture" is probably a JPEG.
And so it is with byte-strings. Unless you know where they came from and
how they were prepared, you can't easily tell what encoding they used, at
leas
he way you want it to.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
nd use actual fractions, which will give
you exact values instead of approximate. At the beginning of your code,
put
from fractions import Fraction
and then change the code to look something like this:
result += Fraction((-1) ** (k+1))/Fraction(2*k-1)
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
.
The ability to losslessly compress *everything* is sheer pseudo-
mathematics, up there with finding an exact rational value for pi, or
squaring the circle using only a compass and straight-edge. But the
ability to losslessly compress *useful data* is real, and such algorithms
operate by fi
to allow those sorts
of debating shenanigans, the obvious counter is "yes, but when I said
that the function doesn't return None, I actually meant that it doesn't
solve the Halting Problem, and it still doesn't do that, so I win nyah
nyah nyah".
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
ssion algorithm that can losslessly compress arbitrary random data
of any length.
I am as sure as this as I am sure you don't have a perpetual motion
machine, a method for squaring the circle using only a compass and
straight-edge, or a fool-proof system for winning the lottery every
ave four bytes each for the two characters and a 40 byte
header. Observe:
py> c = '\U0001d11e'
py> len(c)
1
py> sys.getsizeof(2*c) - sys.getsizeof(c)
4
py> sys.getsizeof(1000*c) - sys.getsizeof(999*c)
4
How big is the object overhead on a (say) thousand character string? Just
one percent:
py> (sys.getsizeof(1000*c) - 4000)/4000
0.01
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
7;x') --> ABC DEF Gxx
args = [iter(iterable)] * n
return izip_longest(fillvalue=fillvalue, *args)
grouper(your_string, 10, '')
ought to give you the results you want.
I expect (but haven't tested) that for strings, the slice version will be
faster.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
Uses an example written in Ruby, but don't let that put you off:
http://raganwald.com/2008/05/narcissism-of-small-code-differences.html
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
ly on that -- if the attacker manages to discover that they use port
45081 instead of 22, they still have to defeat the normal ssh security
before gaining access.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
think it is recommended to use a chroot jail to lock access down
to some subset of the file system.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
"123abc"
py> v = "123abc"
py> u is v
True
Hmmm, obviously the rules are a tad more complicated than I thought... in
any case, you shouldn't rely on automatic interning since it is an
implementation dependent optimization and will probably change without
notice.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
ber=10))
0.00881262868642807
String equality does a short-cut of checking for identity; if the strings
are interned, they will be identical.
[1] Assuming that you actually do have duplicate strings. If every string
is unique, interning them potentially wastes memory.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
uot;] = any_object_you_like()
Want a module with __setattr__ and __getattr__? Make a class, instantiate
it, and shove it in sys.modules.
This has worked since Python 2.1:
http://code.activestate.com/recipes/65207-constants-in-python/
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
although you're storing intervals as the keys, you're matching
regular ints.
I wonder if this would be a good use-case for Antoine Pitrou's
TransformDict?
http://www.python.org/dev/peps/pep-0455/
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
don't really want to do that. What (if anything) are my other options?
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
Malik Rumi wrote:
> On Friday, January 9, 2015 at 7:49:09 PM UTC-6, Steven D'Aprano wrote:
>> I'm having trouble logging into the bug tracker. Is anyone else having
>> the same problem, that is, your user name and password worked earlier but
>> doesn't wor
le corrupted byte can only corrupt a single
code point.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
fo/2000-April/021070.html
I quote:
I do not see any need for a "double udaatta". Perhaps "double
ANudaatta" is meant here?
I don't know Sanskrit, but if somebody suggested that Unicode doesn't
support English because the important letter "double-oh&quo
ch slower than real memory.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
Dave Angel wrote:
> On 02/27/2015 12:58 AM, Steven D'Aprano wrote:
>> Dave Angel wrote:
>>
>>> (Although I believe Seymour Cray was quoted as saying that virtual
>>> memory is a crock, because "you can't fake what you ain't got.")
>
a function are distinct from those
outside.
> * Design your syntax so that you can’t disambiguate them contextually
> between bind and reference
Do you have an example of where Python cannot distinguish between a binding
operation and a reference?
> * Be sure to use it in a late bound language where no warnings will be
> provided about the mistake you’re making at authorship time, deferring the
> educational experience to sundry run times
Python raises a SyntaxError at compile time, not run time, if you try to
bind to a keyword:
py> global = 23
File "", line 1
global = 23
^
SyntaxError: invalid syntax
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
Dan Sommers wrote:
> On Sat, 28 Feb 2015 12:09:31 +1100, Steven D'Aprano wrote:
>
>> There's no harm in calling a local variable "id", if you don't use the
>> built-in id() inside that function. That's one of the reasons why
>> functions
thon%20Performance
but overall, I think it's fair to say that IronPython is about 1.8 times the
speed of CPython.
> With any other implementation language, it would have ground to a halt.
That's laughably inaccurate.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
tps://www.cs.utah.edu/~elb/folklore/mel.html
even if he didn't use a magnetised needle and a steady hand.
http://xkcd.com/378/
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
Mario Figueiredo wrote:
> (warning: Didn't bother prove-reading and spell chocking. Sorry...)
Warning: didn't bother reading. Not sorry at all.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
alling them singletons just
because they quack like singletons is a little weird. Next we'll be calling
the Borg pattern "singletons".
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
ermit the Frog on helium.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
Dennis Lee Bieber wrote:
> Well... when we've got states bigger than some countries...
A Texan farmer goes to Australia on vacation. There he meets an Aussie
farmer and gets to talking. They walk around the farm a little, and the
Aussie shows off his herd of cattle. The Texan immediately replie
the \r that is interpreted by python as special character.
>
> If I try to escape with '\' I don't seem to find a way out...
Can you show what you are doing? Escaping the backslash with another
backslash does work:
py> for c in '\\ref':
... print(c, or
014-12-27"
py> another_day = datetime.strptime(astring, "%Y-%m-%d")
py> difference = today - another_day
py> difference.days
65
py> difference.days/7 # weeks
9.285714285714286
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
ws as the next
guy. I'm allowed to take the parts of their culture I approve of and reject
the parts I don't.
[2] As opposed to the sense of secret codes and ciphers.
[3] In the sense of air that we breathe. One can still have "airs and
graces", although we rarely quantify just how many airs somebody is putting
on.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
Dave Angel wrote:
> On 03/02/2015 08:51 AM, alb wrote:
>> Hi Steven,
>>
>> Steven D'Aprano wrote:
>> []
>>> Since \r is an escape character, that will give you carriage return
>>> followed by "ef{fig:abc".
>>>
>>> The
Mark Lawrence wrote:
> Give me the Steven D'Aprano solution any day of
> the week.
Sounds ominous. Is that better or worse than the final solution?
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
alb wrote:
> Hi Steven,
>
> Steven D'Aprano wrote:
> []
>> Since \r is an escape character, that will give you carriage return
>> followed by "ef{fig:abc".
>>
>> The solution to that is to either escape the backslash:
>>
>> i
hadows. Take a step back, a deep breath, and
remember your basic debugging skills:
a = r'\\ref{fig:abc}'
b = r'\ref{fig:abc}'
print a == b
print a, b
print repr(a), repr(b)
print len(a), len(b)
I'm sure that you know how to do such simple things to investigate whether
t
cape any actual percent signs in your text as '%%'.
To be clear, what I'm doing here is using Python's % string interpolation to
post-process the Latex output:
- replace every '%' in your input string with '%%';
- replace every backslash in your input string with '%(b)s';
- convert;
- post-process using %.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
Sturla Molden wrote:
> Steven D'Aprano wrote:
>
>> Variations in idiom and spelling are a good thing. They open our minds to
>> new possibilities, remind us that we aren't all the same, and keep life
>> fresh. I remember the first time I realised that when I
think that's bad, try pronouncing "ghoti" according to standard
English rules:
"gh" sounds like "f", like in "enough" (enuf).
"o" sounds like "i", like in "women" (wimmin).
"ti" sounds like "sh", like in "station" (stashun).
So "ghoti" sounds like "fish".
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
MRAB wrote:
> There might be a difference, like that between "this program contains a
> bug" and "this program contains one bug".
Those two sentences mean exactly the same thing in standard American,
British and Australian English. Pedants can argue whether "one bug" means
*exactly* one bug, n
Chris Angelico wrote:
> And I've seen a number of proposals to build Python with its
> keywords localized.
ChinesePython:
http://www.chinesepython.org/english/english.html
Teuton:
http://www.fiber-space.de/EasyExtend/doc/teuton/teuton.htm
--
Steve
--
https://mail.python.org/mailman/listin
Charles Heizer wrote:
> Hello,
> I'm new to python and I'm trying to find the right way to solve this issue
> I have.
>
> I'm trying to sort this list by name and then by version numbers. The
> problem I'm having is that I can not get the version numbers sorted with
> the highest at the top or so
snowman, I'm going to stick
to ASCII"?
The "whimsical" characters you are complaining about were important enough
to somebody to spend significant amounts of time and money to write up a
proposal, have it go through the Unicode Consortium bureaucracy, and
eventually have it accep
eology professor was suspected of heresy. It went like this:
[...]
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
.open (2.6 and later);
* If you want the enhanced capabilities of Python 3 open, use io.open;
* In Python 3, io.open is the same thing as built-in open;
* And codecs.open is (I think) mostly there for backwards compatibility.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
Marko Rauhamaa wrote:
> Steven D'Aprano :
>
>> Care to enlighten us then? Because your anecdote doesn't appear to
>> have even the most tenuous relationship to this discussion.
>
> English-speaker, when you name things in your Python programs, you had
&g
ing due diligence?"
Since Unicode has stability guarantees, and the encodings have not changed
in twenty years and will not change in the future, this argument is bogus.
Updating to a new version of the standard means, to a first approximation,
merely allocating some new code points which had previously been undefined
but are now defined.
(Code points can be flagged deprecated, but they will never be removed.)
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
ual activity or the potential for sexual activity". Nor is any mild
joke made at the (self-)expense of some random subgroup of people "sexism",
whether than joke is based on a stereotype or not.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
[email protected] wrote:
> On Thu, Mar 5, 2015, at 09:06, Steven D'Aprano wrote:
>> I mostly agree with Chris. Supporting *just* the BMP is non-trivial in
>> UTF-8
>> and UTF-32, since that goes against the grain of the system. You would
>> have
>> to p
mizations, the core developers agreed that built-in
contain types may assume that `x is y` implies `x == y`. Users of NANs and
other non-reflexive types can subclass or define their own membership
function.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
Ben Finney wrote:
> Steven D'Aprano writes:
>
>> Ben Finney wrote:
>>
>> > [email protected] writes:
>> >
>> >> I should have known better than to make a joke on this mailing
>> >> list. Someone is bound to get their pantie
wish to
try.
- If you are writing your own file system layer, it's 2015 fer fecks sake,
file names should be Unicode strings, not bytes! (That's one part of the
Unix model that needs to die.) You can use UTF-8 or UTF-16 in the file
system, whichever you please, but again remember that both are
variable-width formats.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
precede a high surrogate;
I'm not convinced you should be allowed to create Unicode strings containing
mismatched surrogates like this deliberately, but you certainly shouldn't
be able to do so by accident.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
l allow you to decide which
operations should trap immediately and which don't, it's not a global
all-or-nothing prospect.
Alas, although many (most? all?) FPUs these days support these features,
hardly any high-level language does. You typically cannot even control
these features from C, but have to drop down to assembly. The fine control
that IEEE-754 offers is under-utilized because the language designers don't
support it.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
ber. Ideally, it should carry diagnostic information so I
can see what the failure was, for debugging, although I may not bother to
do so that information should at least be available for use.
I have just re-invented NANs.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
on the root cause of that, and whether or not mild put-downs such
as the one in question are part of the cause or not.
(Well, I call it a "mild put-down". Ben may or may not agree that it is
mild.)
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
ANs:
def sorted(it):
L = list(it)
with disabled_nan_comparisons():
L.sort() # raise if L contains a NAN
return L
sort of thing.
But either solution is a pretty big change for a pretty rare issue.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
Rustom Mody wrote:
> On Friday, March 6, 2015 at 10:13:55 PM UTC+5:30, Steven D'Aprano wrote:
>> Rustom Mody wrote:
>>
>> > On Friday, March 6, 2015 at 3:57:12 AM UTC+5:30, [email protected]
>> > wrote:
>> >> It's been brought up on Stac
re the key function version becomes slower. Or possibly faster.
- Is there are difference between fast key functions like str, and slow ones
that have to do a lot of processing?
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
Rustom Mody wrote:
> On Thursday, March 5, 2015 at 7:36:32 PM UTC+5:30, Steven D'Aprano wrote:
[...]
>> Chris is suggesting that going from BMP to all of Unicode is not the hard
>> part. Going from ASCII to the BMP part of Unicode is the hard part. If
>> you can do th
to three bytes using UTF-8:
py> u'\udbff'.encode('utf-8')
'\xed\xaf\xbf'
py> u'\udf01'.encode('utf-8')
'\xed\xbc\x81'
giving six bytes in total:
'\xed\xaf\xbf\xed\xbc\x81'
This is not UTF-8! But some software mislabels it as UTF-8.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
Marko Rauhamaa wrote:
> Steven D'Aprano :
>
>> Marko Rauhamaa wrote:
>>
>>> That said, UTF-8 does suffer badly from its not being
>>> a bijective mapping.
>>
>> Can you explain?
>
> In Python terms, there are bytes objects b that do
Steven D'Aprano wrote:
> Marko Rauhamaa wrote:
>
>> Steven D'Aprano :
>>
>>> Marko Rauhamaa wrote:
>>>
>>>> That said, UTF-8 does suffer badly from its not being
>>>> a bijective mapping.
>>>
>>&g
)
>>
>> Cheers,
>> Cameron Simpson
>>
>
> What is the bug report number?
>
Who said it was a bug? Cameron called it "surprising", not "wrong".
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
specify the endianness (say, utf-16-be or -le) then you
don't get the BOMs.
> I was simply stating that UTF-8 is not a bijection between unicode
> strings and octet strings (even forgetting Python). Enriching Unicode
> with 128 surrogates (U+DC80..U+DCFF) establishes a bijection, but not
> without side effects.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
Rustom Mody wrote:
> On Saturday, March 7, 2015 at 4:39:48 PM UTC+5:30, Steven D'Aprano wrote:
>> Rustom Mody wrote:
>> > This includes not just bug-prone-system code such as Java and Windows
>> > but seemingly working code such as python 3.
>>
>> W
Marko Rauhamaa wrote:
> Steven D'Aprano :
>
>> Marko Rauhamaa wrote:
>>> '\udd00' is a valid str object:
>>
>> Is it though? Perhaps the bug is not UTF-8's inability to encode lone
>> surrogates, but that Python allows you to create lon
F-16 byte-strings.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
t;
> I am using python 3.4
The re module in Python is pretty old and basic. Can you use Matthew
Barnett's regex module, available on PyPI? I understand it has a richer set
of flags for things such as Unicode letters and the like.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
g the documentation. So it
may be worth just trying it and seeing for yourself.
For PyQt specifically, googling suggests that PyQt does work with Python 3,
but the documentation is out of date and you may have difficulty installing
it:
https://www.google.com.au/search?q=pyqt+python3
--
Steve
Paulo da Silva wrote:
> Hi!
>
> What is the best way to read a file that begins with some few text lines
> and whose rest is a binary stream?
>
> As an exmaple ... files .pnm.
>
> Thanks for any comments/help on this.
A mixed text/binary file is really a binary file that contains some binary
loading via https, which has more overhead than http. There's a
certificate that needs to be checked, the content can't be cached, and
there's the cost of encryption.
Do you have some reason for thinking that the content-length should not be
9870689 bytes? Should it be less or
OP: You're downloading the entire list of packages, which is
> why it's taking so long.
That seems to be the likely explanation.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
; Dose pyqt4 support Python 3 ?
I can only repeat what I already wrote a few days ago:
For PyQt specifically, googling suggests that PyQt does work with Python
3, but the documentation is out of date and you may have difficulty
installing it:
https://www.google.com.au/search?q=pyqt+python3
Mario Figueiredo wrote:
> I'm fairly new to Python, so I don't know if the following is me
> abusing the programming language idioms, or simply a mistake of my IDE
> code inspection routine.
>
> I have a singleton Map class which is defined like so:
>
> class Map:
> _instance = None
> de
t tiresomely difficult).
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
Mario Figueiredo wrote:
> On Thu, 12 Mar 2015 16:31:12 +1100, Steven D'Aprano
> wrote:
>
>>Mario Figueiredo wrote:
>>
>>
>>If this is supposed to be a singleton, you can't create more instances.
>>The point of a singleton that there is only
ator object, which is a kind of iterator.
> Same applies when foo is a 'coroutine' ie
> something having yield used in an rhs and used with '.send' from outside:
> What to call foo and what to call foo(x)?
foo is a generator function, and foo(x) is a generator
has become a sad joke more often than not.
[1] Hard to believe, but yes people do still use AOL.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
7301 - 7400 of 15564 matches
Mail list logo