never blames
> the tools. ;)
DOS Edit was great for quick edits. The file size limit is a
pity, though.
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
three solutions Steven presented, the latter two leave
very strong coupling between the code in your separate files.
This makes working with the files independently impractical.
Stick with mixin classes and pay heed to the Law of Demeter if
you want to de-couple them enough to work on inde
ink XYZ is easy". Furthermore, if you insist on
> QUANTIFYING a QUANTIFIER, simply use any number of legal
> QUANTIFIERS. "I think XYZ is VERY easy" or "I think XYZ is
> SOMEWHAT easy" or "I think XYZ is difficult".
I remind you of http://orwell.ru/library/es
ritish pronunciation of Beauchamp created a minor incident
at Yeoman of the Guard auditions this weekend.
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
On 2012-01-30, Chris Angelico wrote:
> On Mon, Jan 30, 2012 at 11:12 PM, Neil Cerutti wrote:
>>
>> The British pronunciation of Beauchamp created a minor incident
>> at Yeoman of the Guard auditions this weekend.
>
> What about Sir Richard "Chumley&qu
in rotated(range(5), 3))
'3, 4, 0, 1, 2'
"""
i = n - len(seq)
while i < n:
yield seq[i]
i += 1
if __name__ == "__main__":
import doctest
doctest.testmod()
If you have merely an iterable instead of a sequence, then lo
> '2,348,721'
>
> I'm a perpetual novice, so just looking for better, slicker,
> more proper, pythonic ways to do this.
I think you've found an excellent way to do it.
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
ength buffer instead, with
n being the maximum number of characters you'd like to be able to
put back.
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
d that constant will ALWAYS be larger!
What's the point of that?
The only time I've naively pined for such a thing is when
misapplying C idioms for finding a minimum value.
Python provides an excellent min implementation to use instead.
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
A truncated string with a maxlength of INFINITY is just a
string.
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
erhaps encode and then decode, rather than try to encode a
non-encoded str.
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
where reader not
looking for jobs have to delete them.
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
ingly random way in which we apply articles to our
nouns.
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
ding instructions. A sequence of
> instructions is an algorithm, program or routine. You may have
> heard of them :)
A grammarian always uses complete sentence before a colon, even
when introducing a list.
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
mmatical rules used by
> people in real life. You know the ones: linguists. My mistake.
I am not pedantic. You are wrong.
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
On 2012-03-16, Steven D'Aprano wrote:
> On Fri, 16 Mar 2012 17:53:24 +0000, Neil Cerutti wrote:
>
>> On 2012-03-16, Steven D'Aprano
>> wrote:
>>> Ah, perhaps you're talking about *prescriptivist* grammarians, who
>>> insist on applying grammat
On 2012-03-17, Terry Reedy wrote:
> On 3/16/2012 9:08 AM, Neil Cerutti wrote:
>
>> A grammarian always uses complete sentence before a colon, even
>> when introducing a list.
>
> The Chicago Manual of Style*, 13th edition, says "The colon is
> used to mar
On 2012-03-19, Steven D'Aprano wrote:
> On Mon, 19 Mar 2012 11:26:10 +0000, Neil Cerutti wrote:
> [...]
>>> *A major style guide for general American writing and
>>> publication: used by some as the 'Bible'.
>>
>> Thanks for the discussion and
seconds.
This message brought to you by the Debugging is Mostly
Comprehending Old Code and Testing Council.
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
type of fromtimestamp are really the same or not. I
guess I came to that conclusion some time in the past, and it
does seem to work. It may be a simple case of just different
aspects the exact same type being being highlighted in each
definition.
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
say what it would be in an imaginary
> hypothetical implementation doesn't mean I can never say
> anything about it.
I am in a similar situation viz a viz my wife's undergarments.
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
Inform 6 code. I never thought too deeply about why I
disliked it, assuming it was because I already knew Inform 6.
Would you like to write the equivalent, e.g., C code in English?
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
't reasonably do low quantities.
I worked on a system where the main interface to the system was
poking and peeking numbers at memory addresses.
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
On 2012-04-07, Jon Clements wrote:
> Any reason you can't derive from int instead of object? You may
> also want to check out functions.total_ordering on 2.7+
functools.total_ordering
I was temporarily tripped up by the aforementioned documentation,
myself.
--
Neil Cerut
.
In the case of 2 to 3, more help and support than usual is
available: http://docs.python.org/dev/howto/pyporting.html
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
hat
advice, it is not meant to make your code better, but to increase
your code's fidelity within the Python community.
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
#x27;]). This is
surprising given the definition of QUOTE_MINIMAL, which fails to
mention this special case.
csv.QUOTE_MINIMAL
Instructs writer objects to only quote those fields which
contain special characters such as delimiter, quotechar or any
of the characters in lineterminator.
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
On 2012-04-25, Kiuhnm wrote:
> On 4/25/2012 20:05, Neil Cerutti wrote:
>> Is there an explanation or previous dicussion somewhere for the
>> following behavior? I haven't yet trolled the csv mailing list
>> archive, though that would probably be a good place to check.
&
On 2012-04-26, Tim Roberts wrote:
> Neil Cerutti wrote:
>
>>Is there an explanation or previous dicussion somewhere for the
>>following behavior? I haven't yet trolled the csv mailing list
>>archive, though that would probably be a good place to check.
>>
>&
On 2012-04-26, Neil Cerutti wrote:
> I made the following wrong assumption about the csv EBNF
> recognized by Python (ignoring record seps):
>
> record -> field {delim field}
>
> There's at least some csv "standard" documents requirin
ods, when they're sufficent, are usually more
efficient.
Perl integrated regular expressions, while Python relegated them
to a library.
There are thus a large class of problems that are best solve with
regular expressions in Perl, but str methods in Python.
--
Neil Cerutti
--
http://m
27;s clunky enough that it does contribute to making it my last
resort.
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
le react to that
>> misuse by treating any use of regexes with suspicion.
>
> So you claim. I have seen more postings in here where
> REs were not used when they would have simplified the code,
> then I have seen regexes used when a string method or two
> would have done the same thing.
Can you find an example or invent one? I simply don't remember
such problems coming up, but I admit it's possible.
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
On 2011-06-06, ru...@yahoo.com wrote:
> On 06/03/2011 02:49 PM, Neil Cerutti wrote:
> Can you find an example or invent one? I simply don't remember
> such problems coming up, but I admit it's possible.
>
> Sure, the response to the OP of this thread.
Here's a r
On 2011-06-06, Ian Kelly wrote:
> On Mon, Jun 6, 2011 at 10:08 AM, Neil Cerutti wrote:
>> import re
>>
>> print("re solution")
>> with open("data.txt") as f:
>> ? ?for line in f:
>> ? ? ? ?fixed = re.sub(r"(TABLE='\S+)\s
med if it did, that the
quotes are supposed to be there.
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
tion, then instead of:
>
> Traceback (most recent call last):
> File "bar.py", line 123, in foo
> build_rpms()
>
> The stack trace would read:
>
> Traceback (most recent call last):
> File "bar.py", line 123, in foo(1, [2])
> build_
On 2011-06-07, Dun Peal wrote:
> On Jun 7, 1:23?pm, Neil Cerutti wrote:
>> Use pdb.
>
> Neil, thanks for the tip; `pdb` is indeed a great debugging
> tool.
>
> Still, it doesn't obviate the need for arguments in the stack
> trace. For example:
>
> 1) A
robust than modifying the csv
entries in place. It decouples deciphering the meaning of the
data from emitting the data, which is more robust and expansable.
The amount of ingenuity required is less, though. ;)
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
On 2011-07-06, Chris Angelico wrote:
> On Wed, Jul 6, 2011 at 11:41 PM, rantingrick
> wrote:
>> Give it up man and admit i am correct and you are wrong.
>
> Sorry. A Lawful Good character cannot tell a lie.
Lawful Good characters have a hard time coexisting with the
Chaotic N
t in lisps.
>
> In Common Lisp you have:
>
> CL-USER> (union '(a b c) '(b c d))
> (A B C D)
> CL-USER> (intersection '(a b c) '(b c d))
> (C B)
What's the rationale for providing them? Are the definitions
obvious for collections that a not sets?
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
*-<##>-**-<##
# The temptation to make code look cutesy #
# and ornate is a huge time-waster if#
# you let it get the best of you. #
##>-**-<##>-**-<##>-**-<##>-**-<##>-**-<##>-**-<##>-**-<##>-**-<##
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
on that leading white space is important for
code formatting, but that all alignment after that is
unimportant. Peek at Stroustrup's writing for examples. It really
doesn't take much time at all to get used to it.
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
On 2011-07-22, Ian Kelly wrote:
> On Fri, Jul 22, 2011 at 6:59 AM, Neil Cerutti wrote:
>> Under the assumption that leading white space is important for
>> code formatting, but that all alignment after that is
>> unimportant.
>
> ...unless you're trying to adh
On 2011-07-22, John Gordon wrote:
> In <98u00kfnf...@mid.individual.net> Neil Cerutti writes:
>> You can fit much more code per unit of horizontal space with a
>> proportionally spaced font. As a result, that issue, while
>> valid, is significantly reduced.
>
>
st people don't have enough time to write that little.
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
more
carefully about how long I really need that resource.
But maybe I'm being a bit zeallous.
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
be a way to use them for an elegant
> solution of my problem. I can't quite work it out. Any
> brilliant ideas? (or other elegant solutions to the problem?)
If an elegant solution doesn't occur to me right away, then I
first compose the most obvious solution I can think of.
>>> split_path('smith/jones')
['smith', 'jones']
>>> split_path('')
[]
>>> p = split_path('/')
>>> p[0] == os.path.sep
True
>>> len(p)
1
"""
head, tail = os.path.split(path)
retval = []
while tail != '':
retval.append(tail)
head, tail = os.path.split(head)
else:
if os.path.isabs(path):
retval.append(os.path.sep)
return list(reversed(retval))
if __name__ == '__main__':
import doctest
doctest.testmod()
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
the braces shouldn't matter.
No, the braces shouldn't matter,
(Matter, matter, matter, matter)
No, the braces shouldn't matter,
(Matter, matter, matter, matter)
When delineating code-clocks, with my keys a-clitter-clatter,
I prefer semantic whitespace 'cause the braces shouldn't matter.
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
think of is *very* early Fortran, and
> that rightly is considered a mistake.
Early versions of Basic were like this, too. It was common to
compress large C64 Basic programs by removing the spaces and
substituting the command synonyms.
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
lls for extra credit?
>>
>> Greetings from a Dutchman!
No credit. E.g., i.e., exampla gratis, means, "for example."
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
On 2011-08-15, MRAB wrote:
> On 15/08/2011 17:18, Lucio Santi wrote:
>> On Mon, Aug 15, 2011 at 9:06 AM, Neil Cerutti > <mailto:ne...@norwich.edu>> wrote:
>>
>> On 2011-08-14, Chris Angelico > <mailto:ros...@gmail.com>> wrote:
>>
, [1, 2])
False
>>> is_subseq_of(['1,2', '3,4'], [1, 2, 3, 4])
False
"""
x = tuple(x)
ix = 0
lenx = len(x)
if lenx == 0:
return True
for elem in y:
if x[ix] == elem:
ix += 1
else:
ix = 0
if ix == lenx:
return True
return False
if __name__ == '__main__':
import doctest
doctest.testmod()
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
r opinion about
>> the thing I am doing is acceptable, or are there some expects of it that
>> could change.
Perhaps check out difflib.SequenceMatcher.ratio to see if the
library function is good enough.
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
believe the length of a name should usually be
proportional to the scope of the object it represents.
In my house, I'm dad. In my chorus, I'm Neil. In town I'm Neil
Cerutti, and in the global scope I have to use a meaningless
unique identifier. Hopefully no Python namespace ever gets that
big.
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
On 2011-08-29, Chris Angelico wrote:
>> In my house, I'm dad. In my chorus, I'm Neil. In town I'm Neil
>> Cerutti, and in the global scope I have to use a meaningless
>> unique identifier. Hopefully no Python namespace ever gets that
>> big.
>
>
/docs.python.org/faq/design.html#why-self
--
Neil Cerutti
"A politician is an arse upon which everyone has sat except a man."
e. e. cummings
--
http://mail.python.org/mailman/listinfo/python-list
gt; Python is generally low in surprises. Using "if "
> is one place where you do have to think about unintended
> consequences.
Python eschews undefined behavior.
--
Neil Cerutti
"What we really can learn from this is that bad accounting can yield
immense imaginary profits
On 2011-03-03, Jean-Paul Calderone wrote:
> On Mar 3, 8:16?am, Neil Cerutti wrote:
>> On 2011-03-03, Tom Zych wrote:
>>
>> > Carl Banks wrote:
>> >> Perl works deterministically and reliably. ?In fact, pretty much every
>> >> language works det
. End Of.
RIIght. What's a cubit?
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
On 2011-03-18, Stefan Behnel wrote:
> Neil Cerutti, 18.03.2011 13:17:
>> On 2011-03-18, peter wrote:
>>> The Old Testament (1 Kings 7,23) says ... "And he made a molten
>>> sea, ten cubits from the one brim to the other: it was round
>>> all about, and
book,
especially, does not cover issues relating to large scale
software development.
As for factoring out re.compile, I believe they are cached by the
re module, so you would save the cost of retrieving the cached
regex, but not the cost of building it.
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
discovered a bug in a large config file that's been there for
seven years.
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
some, I'd like to know too I won't play them of
> course, ... just would be interesting to know that Python is so
> versatile.
Python would b ea bad choice for most of any fighting game, but
could see use as a configuration or internal scripting engine.
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
ns
didn't already create. Were context managers in existence at the
time?
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
On 2011-04-12, Neil Cerutti wrote:
> On 2011-04-12, Ian Kelly wrote:
>> Flow-control macros were suggested as part of PEP 343, but
>> they were rejected by Guido based on this rant:
>>
>> http://blogs.msdn.com/b/oldnewthing/archive/2005/01/06/347666.aspx
>
>
, it returns only the
> last one.
>
> The documentation in fact says that, at
>
> http://docs.python.org/library/re.html
>
> "If a group is contained in a part of the pattern that matched multiple
> times, the last match is returned."
>
> That's kind of lame, though. I'd expect that there would be some way
> to retrieve all matches.
.findall
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
= re.match(r"^[a-z]+$", s)
>>> if m:
... print(re.findall(r"[a-z]", m.group()))
...
['a', 'b', 'c', 'd', 'e', 'f']
I can see that getting really annoying. Is there a better way to
make multiple group matches accessible without adding a third
element type as a group element?
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
claring an XMLParser.
import xml.etree.ElementTree as etree
with open('file.xml') as xml_file:
parser = etree.XMLParser(encoding='ISO-8859-1')
root = etree.parse(xml_file, parser=parser).getroot()
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
ugh the "is" operator.
> Arguably, it should not be.
But that's the sole purpose of the is operator. You either expose
those details, or you don't have an is operator at all.
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
On 2011-05-05, Roy Smith wrote:
> Of course, C++ lets you go off the deep end with abominations
> like references to pointers. Come to think of it, C++ let's
> you go off the deep end in so many ways...
But you can do some really cool stuff in the deep end.
--
Neil Ce
ll the decorated function,
with no special syntax required. C pointers don't automatically
dereference themselves.
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
pe pattern (an interface class containing a pointer to an
implementation) with template classes to create type-safe
polymorphic types with specializable, decoupled implementations.
A Python programmer just feels depressed that anyone could have a
need for such innovations, though. ;)
--
Neil Cerutti
--
se complex formating declarations.
For simple constructs there's not much difference between them,
but if you switch to .format you'll probably reap some benefit.
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
this with PIL http://www.pythonware.com/products/pil/>.
The technique is necessary in The Python Challenge, for example.
http://www.pythonchallenge.com/>
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
than just its author.
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
t's
> supposed to do (even if it's not the best way to do it).
That's an excellent illustration of bad code hid by a bad comment.
Perhaps better:
def foo():
raise IndexError()
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
ython's argument
passing for non-Python programmers strikes me as a sincere effort
to to simplify something that just isn't simple. If calling it,
"pass by assignment," is admitting defeat, then so be it.
--
Neil Cerutti
--
https://mail.python.org/mailman/listinfo/python-list
east on one
side of the pipeline. Some experience in the industry you want to
script for will really be required, even in such simple cases.
--
Neil Cerutti
--
https://mail.python.org/mailman/listinfo/python-list
o configure your
email server--it isn't that he or she *can't* do it...
--
Neil Cerutti
--
https://mail.python.org/mailman/listinfo/python-list
of them are good at explaining what they
know in a comprehensible and entertaining way. I believe you will
benefit from and even enjoy some of the literature. Here's a
recent favorite: "The Pragmatic Programmer", Andrew Hunt and
David Thomas. ISBN-13: 978-0201616224
--
Neil Cerutti
--
https://mail.python.org/mailman/listinfo/python-list
insist they understand the iterator protocol and exception
handling first they're bound to think iteration is a hovercraft
full of eels.
--
Neil Cerutti
--
https://mail.python.org/mailman/listinfo/python-list
job using a pivot table in Excel.
Office manager, learn thy Excel!
On the other hand, I think Python's csv module is a killer app,
so I do recommend taking the opportunity to learn csv.DictReader
and csv.DictWriter for your own enjoyment.
--
Neil Cerutti
--
https://mail.python.org/mailman/listinfo/python-list
thinking about and
asking questions about Python has been of great interest to me,
and provided entertainment and enlightenment.
--
Neil Cerutti
--
https://mail.python.org/mailman/listinfo/python-list
+ is easy to overcomplicate with the multiple
inheritance feature. Alternatives are almost always preferable.
Some people also appreciate C++'s improvements upon C's type
sytem enough to compile all their C programs with C++. I dig
const qualifiers, even though I'm comletely fine wit
On 2017-10-11, Gregory Ewing wrote:
> Neil Cerutti wrote:
>> I dig const qualifiers, even though I'm comletely fine with
>> their absence from Python.
>
> Out of curiosity, do you have any insights into why you like
> them in C++, if you don't miss them in Py
to a function
>> having prototype void f(char *s);
>
> That *ought* to be prevented. That's the whole point.
I'm far less experienced in C, but I threw up my hands and
stopped bothering with const qualifiers in C due to such
headaches. When in Rome, program without const qualifiers in C.
--
Neil Cerutti
--
https://mail.python.org/mailman/listinfo/python-list
On 2017-10-13, Steve D'Aprano wrote:
> On Fri, 13 Oct 2017 11:54 pm, Gregory Ewing wrote:
>
>> Neil Cerutti wrote:
>>> I can tell at a glance if a parameter is expected to be
>>> modifiable just by looking at the function signature.
>>
>> The que
>> an inefficient coding
>
> I suspect he is using ASCII and storing one value in each byte.
There's also ZSCII, which stores roughly 3 characters every 2
bytes. Since all the digits are in A2, this sequence would take
up 7 bytes in ZSCII as well.
http://inform-fiction.org/zmachine/standards/z1point0/sect03.html
--
Neil Cerutti
--
https://mail.python.org/mailman/listinfo/python-list
as well.
>>
>> http://inform-fiction.org/zmachine/standards/z1point0/sect03.html
>
> not sure how 16 characters can be represented by either ascii
> or zscii in only 8 bytes
Oops! I hastily counted completely wrong. It's 10 bytes in ZSCII
version 2, using a shift-lock.
of the list
> using '+' operator any other solution, this is not looking
> neater
>
> I am a Linux user using python 2.7
You can use the % operator instead of +, and a generator
expression instead of map. It's a pretty small improvement,
though.
values = '||%s||'
On 2017-10-31, Stefan Ram wrote:
> Neil Cerutti writes:
>>You can use the % operator instead of +, and a generator
>>expression instead of map. It's a pretty small improvement,
>>though.
>
> "Improvement" in what sense?
>
> C:\>python -m time
o much better!
You can import wherever you like--only good style requires you to
put them at the top of your file.
Moreover, snippets could be a library, with each snippet a
function, with the import inside the function. That would keep
the module name out of your global namespace.
--
Neil Cerutti
--
https://mail.python.org/mailman/listinfo/python-list
ce 'in' would
>> still be true no matter where the desired string is placed. It would be
>> useful to see some sample data of the old data, and the new data
>
> There is now also a line that starts with:
> PCH_CPU_TEMP:
>
> And I do not want that one.
You'll probably want to include the ':' in the startswith check,
in case someday they also add CPU_TEMP_SOMETHING:.
--
Neil Cerutti
--
https://mail.python.org/mailman/listinfo/python-list
anyone agree, or am I crazy?
I've used csv.DictReader for years and never come across this
oddity. Very interesting!
I am with you. Silently discarding blank records hides
information--the current design is unusable if blank records are
of interest. Moreover, what's wrong with a dict ful
ce 'in' would
>> still be true no matter where the desired string is placed. It would be
>> useful to see some sample data of the old data, and the new data
>
> There is now also a line that starts with:
> PCH_CPU_TEMP:
>
> And I do not want that one.
You'll probably want to include the ':' in the startswith check, in case
someday they also add CPU_TEMP_SOMETHING:.
--
Neil Cerutti
--
https://mail.python.org/mailman/listinfo/python-list
mber of fields is broken
in the data. In my opinion, it should do a thing that makes it
the simplest to handle the situation for the programmer. This is
in fact usually what happens. When there are more records than
define in the header, you can choose what happens by setting
extrasaction. When some records are missing--it sets them to
None. Except, when all the records are missing, it silently hides
the error with no ability provided to recover it.
--
Neil Cerutti
--
https://mail.python.org/mailman/listinfo/python-list
On 2017-12-11, Neil Cerutti wrote:
> On 2017-12-05, Steve D'Aprano wrote:
>> On Wed, 6 Dec 2017 04:20 am, Jason wrote:
>>> while iterating over two files, which are line-by-line
>>> corresponding. The DictReader skipped ahead many lines
>>> breaking
import numpy as np
>
> X=np.arange(1, 1, 1) #root variable
np.arange creates an object. The assignment makes X refer to that
object.
> x1=X
X refers to the previous object, and then the assignment makes x1
refer to that same object.
--
Neil Cerutti
--
https://mail.python.org/mailman/listinfo/python-list
101 - 200 of 1188 matches
Mail list logo