mattharrison/IllustratedPy3

Figure 22.1 Caption

Closed this issue · 3 comments

Note: For some reason I can't copy/paste this caption (where I can with others)—in this case I just get tofu boxes. Is this a xelatex issue?

Also, from Figure 22.1's caption:

If the instance has the attribute defined, that is used.

The pronoun "that" is ambiguous. There are potentially two antecedents here: "instance" and "attribute", and only context helps you decipher between the two.

"that" --> "it"

Or even more explicit:

  • "the attribute" --> "an attribute"
  • "instance" --> "instance of a subclass"
  • "that is used" --> "it uses that attribute"

If the instance of a subclass has an attribute defined, it uses that attribute.

After the instance, the class (__class__) of the instance is searched.

  • "After the instance" --> "If not, after searching the instance of the subclass"

If not, after searching the instance of the subclass, the (__class__) of the instance is searched.

Altogether the caption would read:

Illustration of the __bases__ attribute in a subclass. This connection between a subclass and its parent classes allows you to lookup attributes in a well-defined manner. If the instance of a subclass has an attribute defined, it uses that attribute. If not, after searching the instance of the subclass, the (__class__) of the instance is searched. Failing that, parent classes (__bases__) of the class are searched.

The more I attempt to copy/paste code, I find that I cannot. Instead all I get are tofu boxes--both in Preview (v.7 and 9) and Acrobat Reader DC (build 17.12.20093.238000). Up until this point I haven't noticed this issue as I haven't attempted to copy/paste much. Do you have plans to post code samples to github?

I finally dumped my copy and downloaded a new one from dropbox. Strangely my copy was corrupted on multiple devices—I could no longer search, copy/paste, or even selecting text was becoming difficult. But I downloaded a new copy (of the same file, beg3-sep30.pdf) and now I can select, copy/paste, and search. Weird...but good that it's working.

It would still be nice for readers to have the code samples available to clone via github.

Oct 2. Not sure what is happening with the copy/paste. I can't replicate on my Mac