50 Matching Annotations
  1. Jan 2024
  2. Jul 2023
    1. You might want to suppress only ValueError, since a TypeError (the input was not a string or numeric value) might indicate a legitimate bug in your program. To do that, write the exception type after except: def attempt_float(x): try: return float(x) except ValueError: return x
    1. ``(2) Limitation on application.--Paragraph (1) does not apply to-- ``(A) an entity exhibiting animals to the public under a Class C license from the Department of Agriculture, or a Federal facility registered with the Department of Agriculture that exhibits animals, if such entity or facility holds such license or registration in good standing and if the entity or facility-- ``(i) does not allow any individual to come into direct physical contact with a prohibited wildlife species, unless that individual is-- ``(I) a trained professional employee or contractor of the entity or facility (or an accompanying employee receiving professional training); ``(II) a licensed veterinarian (or a veterinary student accompanying such a veterinarian); or ``(III) <<NOTE: Public information. Plan.>> directly supporting conservation programs of the entity or facility, the contact is not in the course of commercial activity (which may be evidenced by advertisement or promotion of such activity or other relevant evidence), and the contact is incidental to humane husbandry conducted pursuant to a species-specific, publicly available, peer-edited population management and care plan that has been provided to the Secretary with justifications that the plan-- ``(aa) reflects established conservation science principles; ``(bb) <<NOTE: Analysis.>> incorporates genetic and demographic analysis of a multi- institution population of animals covered by the plan; and ``(cc) promotes animal welfare by ensuring that the frequency of breeding is appropriate for the species; and ``(ii) ensures that during public exhibition of a lion (Panthera leo), tiger (Panthera tigris), leopard (Panthera pardus), snow leopard (Uncia uncia), jaguar (Panthera onca), cougar (Puma concolor), or any hybrid thereof, the animal is at least 15 feet from members of the public unless there is a permanent barrier sufficient to prevent public contact; ``(B) a State college, university, or agency, or a State-licensed veterinarian; ``(C) a wildlife sanctuary that cares for prohibited wildlife species, and-- ``(i) is a corporation that is exempt from taxation under section 501(a) of the Internal Revenue Code of 1986 and described in sections 501(c)(3) and 170(b)(1)(A)(vi) of such Code; [[Page 136 STAT. 2338]] ``(ii) does not commercially trade in any prohibited wildlife species, including offspring, parts, and byproducts of such animals; ``(iii) does not breed any prohibited wildlife species; ``(iv) does not allow direct contact between the public and any prohibited wildlife species; and ``(v) does not allow the transportation and display of any prohibited wildlife species off- site; ``(D) has custody of any prohibited wildlife species solely for the purpose of expeditiously transporting the prohibited wildlife species to a person described in this paragraph with respect to the species; or ``(E) an entity or individual that is in possession of any prohibited wildlife species that was born before the date of the enactment of the Big Cat Public Safety Act, and-- ``(i) <<NOTE: Deadline. Registration.>> not later than 180 days after the date of the enactment of the such Act, the entity or individual registers each individual animal of each prohibited wildlife species possessed by the entity or individual with the United States Fish and Wildlife Service; ``(ii) does not breed, acquire, or sell any prohibited wildlife species after the date of the enactment of such Act; and ``(iii) does not allow direct contact between the public and prohibited wildlife species.''.

      Limitations/Exceptions

  3. Feb 2023
    1. Subsection (1) shall not apply—(a)in respect of personal data relating to the data subject that consists of anexpression of opinion about the data subject by another person given inconfidence or on the understanding that it would be treated as confidential, or(b)to information specified in paragraph (b)(i)(III)of that subsection in so far as arecipient referred to therein is a public authority which may receive data in thecontext of a particular inquiry in accordance with the law of the State.

      Access doesn't need to include opinions made in confidence, or information obtained by a public authority who recieves data in the context of a particular inquiry.

    1. The EU adopted its own TDM exceptions in 2019 as part ofthe Digital Single Market (DSM) Directive.

      On EU TDM exceptions.

    2. text and data mining was seen as something that would benefit scientific researchin general

      On a benefit of text and data mining as fair use.

    3. It could be argued that the training of an AI model does not fulfil all of these requirements,but it is likely to be something that will be argued in court by future defendants incopyright litigation. It is clear that making a temporary copy for training is transient, butit could be said that it is not incidental. The copy is also part of a technological process,but it may not be considered a lawful use. Similarly, one could argue that the resultingmodel does have economic significance, but specific copies do not, a model such as StableDiffusion can be trained with billions of images, each individual copy used in training maynot count as having “independent economic significance”.

      Key questions around exceptions.

  4. Jan 2023
    1. Nice try, but it's still full of exceptions. To make the above jingle accurate, it'd need to be something like: I before e, except after c Or when sounded as 'a' as in 'neighbor' and 'weigh' Unless the 'c' is part of a 'sh' sound as in 'glacier' Or it appears in comparatives and superlatives like 'fancier' And also except when the vowels are sounded as 'e' as in 'seize' Or 'i' as in 'height' Or also in '-ing' inflections ending in '-e' as in 'cueing' Or in compound words as in 'albeit' Or occasionally in technical words with strong etymological links to their parent languages as in 'cuneiform' Or in other numerous and random exceptions such as 'science', 'forfeit', and 'weird'.
  5. Sep 2022
    1. The scalability issue is somewhat related to the versionability issue. In the small, checked exceptions are very enticing. With a little example, you can show that you've actually checked that you caught the FileNotFoundException, and isn't that great? Well, that's fine when you're just calling one API. The trouble begins when you start building big systems where you're talking to four or five different subsystems. Each subsystem throws four to ten exceptions. Now, each time you walk up the ladder of aggregation, you have this exponential hierarchy below you of exceptions you have to deal with. You end up having to declare 40 exceptions that you might throw. And once you aggregate that with another subsystem you've got 80 exceptions in your throws clause. It just balloons out of control. In the large, checked exceptions become such an irritation that people completely circumvent the feature. They either say, "throws Exception," everywhere; or—and I can't tell you how many times I've seen this—they say, "try, da da da da da, catch curly curly." They think, "Oh I'll come back and deal with these empty catch clauses later," and then of course they never do. In those situations, checked exceptions have actually degraded the quality of the system in the large.

      This is another case where I think inference would solve most of the issue.

    2. Anders Hejlsberg: Let's start with versioning, because the issues are pretty easy to see there. Let's say I create a method foo that declares it throws exceptions A, B, and C. In version two of foo, I want to add a bunch of features, and now foo might throw exception D. It is a breaking change for me to add D to the throws clause of that method, because existing caller of that method will almost certainly not handle that exception. Adding a new exception to a throws clause in a new version breaks client code. It's like adding a method to an interface. After you publish an interface, it is for all practical purposes immutable, because any implementation of it might have the methods that you want to add in the next version. So you've got to create a new interface instead. Similarly with exceptions, you would either have to create a whole new method called foo2 that throws more exceptions, or you would have to catch exception D in the new foo, and transform the D into an A, B, or C. Bill Venners: But aren't you breaking their code in that case anyway, even in a language without checked exceptions? If the new version of foo is going to throw a new exception that clients should think about handling, isn't their code broken just by the fact that they didn't expect that exception when they wrote the code? Anders Hejlsberg: No, because in a lot of cases, people don't care. They're not going to handle any of these exceptions. There's a bottom level exception handler around their message loop. That handler is just going to bring up a dialog that says what went wrong and continue. The programmers protect their code by writing try finally's everywhere, so they'll back out correctly if an exception occurs, but they're not actually interested in handling the exceptions. The throws clause, at least the way it's implemented in Java, doesn't necessarily force you to handle the exceptions, but if you don't handle them, it forces you to acknowledge precisely which exceptions might pass through. It requires you to either catch declared exceptions or put them in your own throws clause. To work around this requirement, people do ridiculous things. For example, they decorate every method with, "throws Exception." That just completely defeats the feature, and you just made the programmer write more gobbledy gunk. That doesn't help anybody.

      The issue here seems to be the transitivity issue. If method A calls B which in turn calls C, then if C adds a new checked exception B needs to add it even if it is just proxying it and A is already handling it via "finally". This seems like an issue of inference to me. If method B could dynamically infer its checked exceptions this wouldn't be as big of an issue.

      You also probably want effect polymorphism for the exceptions so you can handle it for higher order functions.

  6. Jun 2022
    1. It is NOT an exception if the username is not valid or the password is not correct. Those are things you should expect in the normal flow of operation. Exceptions are things that are not part of the normal program operation and are rather rare.

      Exceptions are things that are not part of the normal program operation and are rather rare.

    2. Exceptions should be reserved for what's truly exceptional.

      Exceptions should be reserved for what is truly exceptional.

    3. Make sure the exceptions are at the same level of abstraction as the rest of your routine.

      Make sure that exceptions are at the same level of abstraction as the rest of your routine.

    4. Don't use exceptions if the error can be handled locally

      Don't use exceptions if the error can be handled locally.

    5. Use exceptions to notify about things that should not be ignored.

      Use exceptions for things that should not be ignored.

    6. In linguistics this is sometimes called presupposition failure. The classic example is due to Bertrand Russell: "Is the King of France bald" can't be answered yes or no, (resp. "The King of France is bald" is neither true nor false), because it contains a false presupposition, namely that there is a King of France. Presupposition failure is often seen with definite descriptions, and that's common when programming. E.g. "The head of a list" has a presupposition failure when a list is empty, and then it's appropriate to throw an exception.

      Presupposition failure is a term from linguistics. The classical example is from Bertrand Russel and pertains to the questions: Is the King of France bald? It contains a false presupposition, since there is no King of France. So the answer is neither true nor false.

    7. if the function's assumptions about its inputs are violated, it should throw an exception instead of returning normally.

      If a function's assumptions about it's inputs are violated, throw an exception.

  7. Apr 2022
    1. This inflector is like the basic one, except it expects lib/my_gem/version.rb to define MyGem::VERSION.

      really? just for that? that's an unfortunate exception

  8. Apr 2021
  9. Mar 2021
  10. Feb 2021
    1. Literally, everything in this example can go wrong. Here’s an incomplete list of all possible errors that might occur: Your network might be down, so request won’t happen at all The server might be down The server might be too busy and you will face a timeout The server might require an authentication API endpoint might not exist The user might not exist You might not have enough permissions to view it The server might fail with an internal error while processing your request The server might return an invalid or corrupted response The server might return invalid json, so the parsing will fail And the list goes on and on! There are so maybe potential problems with these three lines of code, that it is easier to say that it only accidentally works. And normally it fails with the exception.
    2. we also wrap them in Failure to solve the second problem: spotting potential exceptions is hard
    3. exceptions are not exceptional, they represent expectable problems
    4. Exceptions are not exceptional
    5. And checked exceptions won’t be supported in the nearest future.
    1. But so far everything brought up has just been about the relative advantages of checked exceptions, and that issue is closed. We won't do it.
    2. I'm not a fan of listing exceptions functions can throw, especially here in Python, where it's easier to ask forgiveness than permission.
    3. certainly I wouldn't want it to start telling me that I'm not catching these!
    4. I'm not a fan of checking exceptions either
    5. In my past life with Java, I've had mixed feelings about exception checking. It's saved me from some mistakes more than it's been annoying. Maybe the checking of exceptions could be controlled by some notion of "unchecked exceptions"?
  11. Nov 2020
    1. Note: Yes, it is sentence case, and yes, there should be a full stop if it was true sentence case — but for the love of all things good and designy, please don’t add a full stop.
    1. In the case of email, it can be argued that the widespread use of the unhyphenated spelling has made this compound noun an exception to the rule. It might also be said that closed (unhyphenated) spelling is simply the direction English is evolving, but good luck arguing that “tshirt” is a good way to write “t-shirt.”
  12. Oct 2020
    1. However, know when to be inconsistent -- sometimes style guide recommendations just aren't applicable.
    2. When applying the guideline would make the code less readable, even for someone who is used to reading code that follows this PEP.
    1. Generally, you should read the value of a store by subscribing to it and using the value as it changes over time. Occasionally, you may need to retrieve the value of a store to which you're not subscribed. get allows you to do so.
    1. If a part of the content deserves its own heading, and that heading would be listed in a theoretical or actual table of contents, it should be placed in a <section>. The key exception is where the content may be syndicated; in this case, use <article> element instead.
  13. Sep 2020
    1. The value of dotAll is a Boolean and true if the "s" flag was used; otherwise, false. The "s" flag indicates that the dot special character (".") should additionally match the following line terminator ("newline") characters in a string, which it would not match otherwise: U+000A LINE FEED (LF) ("\n") U+000D CARRIAGE RETURN (CR) ("\r") U+2028 LINE SEPARATOR U+2029 PARAGRAPH SEPARATOR This effectively means the dot will match any character on the Unicode Basic Multilingual Plane (BMP). To allow it to match astral characters, the "u" (unicode) flag should be used. Using both flags in conjunction allows the dot to match any Unicode character, without exceptions.
    1. Web developers are well aware of the mess you can get into with global CSS, and the action of writing <Child class="foo"/> and <div class={_class}>` (or similar) in the child component is an explicit indication that, while taking advantage of all the greatness of style encapsulation by default, in this case you have decided that you want a very specific and controlled "leak", of one class, from one component instance to one component instance.
  14. Aug 2020
    1. I will have to look at code to be sure but the rule that */* trumps all is applied only when the request is not an ajax request. So if you are making ajax request then you should be good.
    1. More information about limitations and exceptions to copyright

      Under more information about limitations and exceptions to copyright add section titled Case Studies: Case studies provide valuable information relating to the state of affairs in various countries, as well as the opposing views when debating copyright issues.

      • South Africa: a case study of politics and the global economics of limitations and exceptions to copyright. The current debate in South Africa regarding proposed amendments to the Copyright Bill allows showcases the different sides of the debate, and how legal frameworks, e.g. the Constitution of the Republic of South Africa also informs decision making.
      1. US Government Threatening To Kill Free Trade With South Africa After Hollywood Complained It Was Adopting American Fair Use Principles, by Mike Masnick, 4 November 2019.
      2. South Africa’s Copyright Amendment Bill – one year on, by Denise Nicholson, 30 March 2020. This work is licensed under a Creative Commons Attribution 4.0 International License.
      3. South Africa’s Copyright Amendment Bill Returned to Parliament for Further Consideration, Mike Palmedo, 22 June 2020. This work is licensed under a Creative Commons Attribution 4.0 International License.
      4. See the light and pass the Copyright Amendment Bill, by Mugwena Maluleke, Tebogo Sithathu, Jack Devnarain, Tusi Fokane, Ben Cashdan and Jace Nair, 24 June 2020. © Mail & Guardian Online.
      5. South African President’s Reservations to Copyright Bill Not Supported by Law, by Sean Flynn, 13 July 2020. This work is licensed under a Creative Commons Attribution 4.0 International License.

      For a comprehensive list of materials relating to the South African Copyright Amendment Bill processes, see Copyright and Related Issues: USTR GSP trade threats re: Bill, list compiled and amended by Denis Nicholson

  15. Jul 2020
    1. Lastly, in order for a statement to be defamatory, it must be unprivileged. You cannot sue for defamation in certain instances when a statement is considered privileged. For example, when a witness testifies at trial and makes a statement that is both false and injurious, the witness will be immune to a lawsuit for defamation because the act of testifying at trial is privileged.
    1. If you have worked with emails before, the idea of placing a script into an email may set off alarm bells in your head! Rest assured, email providers who support AMP emails enforce fierce security checks that only allow vetted AMP scripts to run in their clients. This enables dynamic and interactive features to run directly in the recipients mailboxes with no security vulnerabilities! Read more about the required markup for AMP Emails here.
  16. May 2020
    1. Explicit Form (where the purpose of the sign-up mechanism is unequivocal). So for example, in a scenario where your site has a pop-up window that invites users to sign up to your newsletter using a clear phrase such as: “Subscribe to our newsletter for access to discount vouchers and product updates!“, the affirmative action that the user performs by typing in their email address would be considered valid consent.
  17. Aug 2019
    1. Although such encapsulation is desirable for application-level components like FeedStory or Comment, it can be inconvenient for highly reusable “leaf” components like FancyButton or MyTextInput. These components tend to be used throughout the application in a similar manner as a regular DOM button and input, and accessing their DOM nodes may be unavoidable for managing focus, selection, or animations.
  18. Oct 2018
    1. ). In many cases, boys and men learn rape-supportive rules, or circumstances in which it is acceptable to force a girl or woman to have sex (e.g., after paying for a meal and receiving no sexual favors, a man may rape a wom

      Rape Myth Acceptance trivializes rape and encourages men to do so by giving exceptions

    Tags

    Annotators

  19. Sep 2018