
16 Cal.App.3d 863 (1971)
94 Cal. Rptr. 555
THE PEOPLE, Plaintiff and Respondent,
v.
RICHARD THOMAS CARNESI, Defendant and Appellant.
Docket No. 18863.
Court of Appeals of California, Second District, Division Five.
April 20, 1971.
*866 COUNSEL
Nicholas Ferrara for Defendant and Appellant.
Evelle J. Younger, Attorney General, William E. James, Assistant Attorney General, and Norman N. Flette, Deputy Attorney General, for Plaintiff and Respondent.
OPINION
KAUS, P.J.
Defendant Carnesi appeals from the judgment (order granting probation) which followed his conviction of a violation of section 11910 of the Health and Safety Code (possession of restricted dangerous drug  Secobarbital).

FACTS
At about midnight of August 10, 1969, Officers Pearson and Rasmussen of the Los Angeles Police Department responded to a radio communication that juveniles were disturbing the peace at 129 West 90th Street. At the scene they noticed a group of young people standing around. Three appeared to be drinking from alcoholic beverage containers. Carnesi, one of the three, was drinking from a can of beer. Rasmussen later smelled the contents of the can and it had an "odor like beer." The names of the other two who were drinking were Macias and Martinez. The three were placed under arrest for a violation of section 41.27 (c) of the Los Angeles Municipal Code.[1] When Macias removed his hand from his pocket several red capsules fell to the ground. They resembled Seconal. Then there followed a scuffle, mainly between Macias and the officers. Since a charge of resisting arrest (Pen. Code, § 148) which was first lodged against Carnesi was later dismissed, the evidence with respect to the details of the scuffle appears only in bits and pieces as far as the present record is concerned. It does appear that at one point Rasmussen hit defendant over the head with a flashlight when he thought that defendant was coming at him. In any event, defendant was searched by Rasmussen before being placed in the police vehicle and four capsules in a cellophane bag were removed from Carnesi's pants pocket.
*867 Carnesi testified that Rasmussen never reached into his pocket and never retrieved anything from it. He had no capsules of any kind in his pocket.
Other facts, substantive and procedural, will be set forth in our discussion.
Defendant's multiple contentions on appeal are: 1. For various reasons his arrest was illegal and the evidence concerning the contents of defendant's pocket should have been suppressed. 2. The People did not prove the chemical nature of the capsules. 3. The People did not prove defendant's knowledge of the chemical nature of the capsules. 4. The conditions of defendant's probation were discriminatory.
(1) Defendant argues that the People never requested the court below to take judicial notice of the city ordinance. That is true, but the only consequence of that failure is that the court was not required to notice the ordinance. (Evid. Code, § 453.) It still could do so on its own motion if it complied with subdivision (a) of section 455 of the Evidence Code.[2] This it did not do, though it necessarily must have noticed the ordinance.
The court's failure to so comply with the Evidence Code is but a cosmetic defect. Had it done so there would have been nothing the defendant could have done to change the unchallengeable fact that the ordinance existed and that it read as copied by us in footnote 2 above.
(2) Defendant complains that the officers testified that they had arrested defendant and his companions for the violation of a city ordinance which made it illegal to drink "in public view,"[3] which is not what section 41.27 (c) forbids. The fact that the officers were mistaken concerning the precise effect of the ordinance is immaterial if the evidence shows that they had probable cause to believe that it had been violated. (People v. Smith, 153 Cal. App.2d 190, 192 [314 P.2d 31]; cf. People v. Walker, 273 Cal. App.2d 720, 725 [78 Cal. Rptr. 439]; People v. Wright, 273 Cal. App.2d 325, 335-336 [78 Cal. Rptr. 75]; People v. Woods, 239 Cal. App.2d 697, 702 [49 Cal. Rptr. 266].) The record is replete with evidence that defendant *868 and his two companions were doing their drinking in locations prohibited by section 41.27 (c).
(3) Defendant complains that the People never produced the beer can and its contents and therefore did not prove that the liquid contained more than one-half of one per cent of alcohol by volume. The question is not, however, what the can contained but what the officers reasonably thought to be in it. Defendant was drinking from a can bearing the label of a well-known brand of beer. As reasonable men the officers could assume that it contained beer and that its alcohol content was that of ordinary beer.[4]
Defendant attacks the constitutionality of section 41.27 (c). We do not believe that argument is open to him unless that section had been held unconstitutional before the date of defendant's arrest. We have not been referred to any such holding.[5]
Pierson v. Ray, 386 U.S. 547 [18 L.Ed.2d 288, 87 S.Ct. 1213] was a prosecution under the Civil Rights Act of 1871. (42 U.S.C. § 1983.) Some of the defendants had arrested the plaintiffs under a Mississippi statute later declared unconstitutional in Thomas v. Mississippi, 380 U.S. 524 [14 L.Ed.2d 265, 85 S.Ct. 1327]. The Supreme Court held that an officer was not liable for "acting under a statute that he reasonably believed to be valid but that was later held unconstitutional, on its face or as applied." (386 U.S. at p. 555 [18 L.Ed.2d at p. 295].)
Pierson was, of course, an action against the arresting officer, not the arrestee. Theoretically, at least, the officer might be allowed a defense, which could not be used as justification for the legality of an arrest when the People must affirmatively prove such legality in a case against the arrestee. Nevertheless, we think, that Pierson's philosophy is applicable in the present case as well. (See also People v. Medina, 15 Cal. App.3d 845, 848 [93 Cal. Rptr. 560].)
(4) The purpose of the exclusionary rule is to discourage illegal police conduct. (Lockridge v. Superior Court, 3 Cal.3d 166, 171 [89 Cal. Rptr. 731, 474 P.2d 683] and authorities cited.) We do not see how that purpose would be advanced by ex post facto condemnation of an arrest, *869 apparently valid when made. The Constitution does not demand judicial overkill.[6]
Defendant further claims that even if the arrest was legal, the search of his person was not. He places great reliance in People v. Dukes, 1 Cal. App.3d 913 [82 Cal. Rptr. 218] and People v. Williams, 9 Cal. App.3d 565 [88 Cal. Rptr. 349] as standing for the proposition that the police had no right to search him. Dukes is clearly distinguishable because the court's analysis of the applicable statute led it to the view that under the facts of the case, the arrest in question being for certain traffic offenses, the custody was "limited to taking the arrestee before a magistrate."[7]Williams is not in point because there the court simply held that the police had no right to arrest the defendant.
(5) Finally defendant claims that the trial court erroneously thought that the denial of an alternative writ by this court between the time when defendant's motion to suppress under section 1538.5 had been denied and the case went to trial, foreclosed it from reconsidering the question of the legality of the arrest, search and seizure.[8]
To this there are two answers: first, the record indicates that the trial court did not consider itself foreclosed from reconsidering the question of suppression; second, defendant was not entitled to such a reconsideration as a matter of right. (People v. Harrington, 2 Cal.3d 991, 997-998 [88 Cal. Rptr. 161, 471 P.2d 961].)

THE CHEMICAL NATURE OF THE CAPSULES
(6) This is another case where a defendant, on appeal, seeks to take advantage of the fact that with his help the prosecution presented an extremely weak case on one element of its proof.[9] While we do not wish to encourage slipshod presentations by the People, neither do we believe *870 that we should be overtechnical with respect to matters which were not seriously contested below.
Here is what happened: defendant made a motion to suppress the capsules taken from his person. (Pen. Code, § 1538.5.) At that motion the facts surrounding his arrest were developed through the testimony of Officers Pearson and Rasmussen. There was testimony concerning the number of capsules that had apparently fallen out of Macias' pocket, as well as testimony concerning a single capsule that had been found in the police car after defendant and two others had been transported to the station.[10] In addition, of course, there was Rasmussen's testimony that he had removed four capsules in a cellophane bag from Carnesi's pocket. There was no other testimony concerning any "four capsules."
The capsules themselves were not received in evidence at the motion to suppress, nor was there any testimony concerning their chemical nature.
After the motion to suppress had been denied the case eventually went to trial before a different judge. It was stipulated that the matter could be submitted, at least in part, on the transcript of the motion to suppress. Initially defense counsel added to this stipulation that he would also stipulate "if the chemist were called he would testify that the capsules contained whatever the charge alleges." Later that day, after the court had read the transcript of the motion to suppress, the following occurred:
"[PROSECUTOR]: At this time the People would stipulate and ask counsel for the defendant to stipulate that if F.J. Gerhart were called and duly sworn he would qualify as an expert forensic chemist and would testify he examined the four capsules allegedly obtained by Officer Rasmussen from this defendant and found these capsules to contain secobarbital. [DEFENSE COUNSEL]: Your Honor, I will stipulate to that, with the exception of one portion of it, without admitting that these four capsules were taken from the defendant. THE COURT: That is not part of the stipulation, is it? [PROSECUTOR]: No, it's not, Your Honor. THE COURT: Will you state the stipulation again, please, so we will have it clear in the record? [DEFENSE COUNSEL]: He said allegedly taken from the defendant. That's what his statement was, and that was the part I was excepting to, without admitting they were taken from the defendant. THE COURT: Well, restate the stipulation, then. The four capsules admitted into evidence in this case. [PROSECUTOR]: The People would stipulate and ask counsel for this defendant to stipulate that if F.J. Gerhart were called and duly sworn he would qualify as an expert forensic chemist and would testify that he *871 examined the four red capsules found by Officer Rasmussen, and in evidence in this case, and found these four capsules to contain secobarbital. [DEFENSE COUNSEL]: We are back again to the same objection about found by Officer Rasmussen. I think the Court suggested that [sic] four capsules that were considered in this case. THE COURT: Well, sir, will you stipulate in this matter that the four capsules examined by Mr. Gerhart  [DEFENSE COUNSEL]: Contained secobarbital. THE COURT:  and entered  Strike that  and marked as an exhibit in this case were secobarbital? [DEFENSE COUNSEL]: Yes, Your Honor, if he were called he would so testify. [PROSECUTOR]: The People stipulate. THE COURT: All right. The stipulation will be noted in the record."
It is evident from this exchange that both the court and the prosecutor were under the misapprehension that capsules had been received in evidence and that the stipulation should pertain to such capsules. Defense counsel apparently knew better, because he reworded the court's suggestion that the stipulation should refer to the "four capsules admitted into evidence in this case," by offering to stipulate to the "four capsules that were considered in this case." Then everybody apparently started to talk at the same time and, strictly speaking, there emerged a stipulation "that the four capsules examined by Mr. Gerhart and marked as an exhibit in this case were secobarbital."
It is also quite evident that defense counsel's only interest in negotiating the terms of the stipulation with precision, was not to bargain away his client's only remaining defense that, whatever the chemical nature of the capsules, they did not come out of his pocket. It was he who suggested the only formulation of the stipulation which was practicable in view of the fact that no capsules were in evidence, but there had been testimony about four capsules which, of necessity, was "considered in this case." Under all the circumstances it would appear grossly unfair to the People to hold that there was no stipulation concerning the chemical nature of the capsules. Both sides were obviously desirous of avoiding the necessity of hearing testimony concerning a non-issue. The fact that the words spoken did not, perhaps, amount to an offer and acceptance valid under the law of contracts, is immaterial.

DEFENDANT'S KNOWLEDGE OF THE NATURE OF THE CAPSULES' CONTENTS
No case has been found holding that knowledge of the nature of restricted dangerous drugs, possession of which is illegal under section 11910 of the Health and Safety Code, is a necessary element of the offense. (See however Frazzini v. Superior Court, 7 Cal. App.3d 1005, 1015 [87 *872 Cal. Rptr. 32]; People v. Allen, 254 Cal. App.2d 597, 600-601 [62 Cal. Rptr. 235].) Both sides assume that such knowledge is an element and we can see no legitimate reason for differentiating between restricted dangerous drugs and narcotics. (Cf. People v. Winston, 46 Cal.2d 151, 159-161 [293 P.2d 40].) (7) By the same token it seems clear that the quantum of evidence necessary to show knowledge should be the same for both types of contraband. (8) The authority of cases such as People v. White, 71 Cal.2d 80, 83 [75 Cal. Rptr. 208, 450 P.2d 600]; People v. Roth, 261 Cal. App.2d 430, 445 [68 Cal. Rptr. 49] and the cases on which they, in turn, rely, compels us to hold that an inference of knowledge is justified from mere possession.

THE CONDITIONS OF PROBATION
In the superior court Macias pleaded guilty. He waived a probation report. Colloquy between Macias and the court revealed that he was 22 years old, had been in some kind of trouble for joy riding and had been convicted of possessing marijuana when he was 18. He was then sentenced to six months in the county jail. The sentence was suspended on condition that he pay a fine of $150, probation to terminate on payment of the fine.
Carnesi's probation report revealed a prior record consisting only of relatively minor traffic violations. It showed that he was employed by his father at a wage of $5.25 an hour. He was placed on probation for two years on several conditions not imposed on Macias, one of which was a fine of $500. When counsel inquired why Carnesi was more severly dealt with than Macias, the colloquy copied in the footnote ensued.[11]
Defendant suggests that the court was mistaken in believing that it was he and not Macias who resisted arrest. It seems clear that the court was at least in error if it believed that Macias had submitted to his arrest without resistance.[12]
*873 Defendant, of course, is in no position to complain that Macias received undeserved leniency. (People v. Schulze, 169 Cal. App.2d 430, 431-432 [337 P.2d 109]; cf. People v. Smith, 259 Cal. App.2d 868, 872-873 [66 Cal. Rptr. 586].)
As far as the court's belief that defendant, too, resisted arrest is concerned, it does find some support in the record. We have mentioned that the testimony concerning the scuffle which was mainly offered at the 1538.5 hearing is fragmentary. Nevertheless, at the trial Officer Rasmussen did testify that Carnesi was involved.[13] In the probation report there appears the following statement: "An altercation between co-defendant and the police ensued and all parties became involved. The defendant was observed, at this time, to attempt to pull one of the subjects from one of the officer's grasp." Defendant did not offer to contradict this statement before the court imposed sentence. While, as indicated in the last footnote, defense counsel was perhaps attempting some kind of traverse after the court gave its reasons for the sentence, the single word "well" certainly does not compel such an interpretation.
Defendant claims that counsel was cut off by the court's "that is all." With some judges and some attorneys this might be a permissible interpretation of the record. In this case, however, it is not. Counsel's conduct throughout was that of a vigorous defender who did not hesitate to speak up when he had something to say. The court, on the other hand, was most *874 patient and even set aside a finding that defendant was guilty in order that Officer Rasmussen might be recalled, after a certain misunderstanding between counsel had come to light.
Defendant is, of course, still serving his probation. If we are correct in our interpretation of the record and if the trial court did indeed confuse Macias' conduct at the time of the arrest, with that of defendant, we are certain that it will consider a motion to modify the terms of defendant's probation. (Pen. Code, § 1203.3.) In so stating we do not imply that even if the trial court was mistaken, it is under a duty to act favorably on such a motion.
The judgment (order granting probation) is affirmed.
Stephens, J., and Aiso, J., concurred.
Appellant's petition for a hearing by the Supreme Court was denied June 17, 1971. Peters, J., was of the opinion that the petition should be granted.
NOTES
[1]  We take judicial notice of the ordinance. (Evid. Code, §§ 452, subd. (b), 459.) It reads, in pertinent part as follows: "No person shall drink any malt, spirituous or vinous liquor containing more than one-half of one per cent of alcohol by volume, upon any street, sidewalk or parkway, ... or in any public place, or in any place open to the patronage of the public, which premises are not licensed for the consumption of such liquor on the premises."
[2]  Section 455. "With respect to any matter specified in Section 452 or in subdivision (f) of Section 451 that is of substantial consequence to the determination of the action:

"(a) If the trial court has been requested to take or has taken or proposes to take judicial notice of such matter, the court shall afford each party reasonable opportunity, before the jury is instructed or before the cause is submitted for deceision by the court, to present to the court information relevant to (1) the propriety of taking judicial notice of the matter and (2) the tenor of the matter to be noticed." (Italics added.)
[3]  The "public view" concept is part of section 41.27 (a) of the Los Angeles Municipal Code, which does not forbid drinking, but being intoxicated.
[4]  Beer which contains less than one-half of one per cent of alcohol by volume would not even meet the statutory definition of the beverage. (Bus. & Prof. Code, §§ 23004, 23006.) The provisions of the Alcohol Beverage Control Act (Bus. & Prof. Code, § 23000) would therefore not be applicable to it.
[5]  Section 41.27 (a) of the Los Angeles Municipal Code which forbids intoxication in certain locations was held unconstitutional in In re Koehne, 59 Cal.2d 646 [30 Cal. Rptr. 809, 381 P.2d 633] and In re Zorn, 59 Cal.2d 650 [30 Cal. Rptr. 811, 381 P.2d 635]. In spite of reliance on those cases a Fresno ordinance prohibiting drinking on public property, very similar to section 41.27 (c), was held valid in People v. Butler, 252 Cal. App.2d Supp. 1052 [59 Cal. Rptr. 924].
[6]  We have noted that the officers purported to base the arrest on conduct which no statute or ordinance known to us, forbids. This seems immaterial, since it is not the purpose  though perhaps a byproduct  of the exclusionary rule to turn policemen into legal scholars.
[7]  Query, the extent to which Dukes is considered good law even on that point. See Morel v. Superior Court, 10 Cal. App.3d 913, 918-920 [89 Cal. Rptr. 297]. See also Pugh v. Superior Court, 12 Cal. App.3d 1184, 1188 [91 Cal. Rptr. 168].
[8]  We express no view concerning the effect of the denial of an alternative writ on later proceedings in the trial or appellate courts.
[9]  We do not imply trickery on the part of counsel whose conduct both below and here has been as exemplary as the quality of his representation of defendant was excellent. On the contrary, as we shall show, counsel was genuinely trying to dispose of an uncontested issue in the easiest possible way. Nor are we criticizing counsel for raising the issue on appeal. It is his plain duty to do so. (In re Smith, 3 Cal.3d 192, 197-198 [90 Cal. Rptr. 1, 474 P.2d 969].)
[10]  The capsule was found in the center of the rear seat where an otherwise unidentified person by the name of Vigen had been sitting.
[11]  "Well, Mr. Carnesi, it's generally not done in this courtroom, to explain reasons for sentencing, but I will tell you in this case the officer in this matter complained that this man resisted. There was a 242 here which was dismissed. But the probation report indicates that this man fought the police officers at the time, and I feel that anyone who resists constituted authority is somewhat of a menace in the community and should not be punished as one who does not resist constituted authority. I am a believer in respect for constituted authority by all persons who live in our society. [DEFENSE COUNSEL]: Well  THE COURT: That is all, ..."
[12]  We have no way of knowing what caused the court's apparent misapprehension. Possibly it was the fact that Officer Pearson at the 1538.5 hearing at first confused Macias with Carnesi and testified that it was Carnesi who resisted. He later corrected himself.
[13]  "Q Did you say he was involved in the scuffle at the preliminary hearing? A He got hit right in the head by my flashlight. I believe that's in the preliminary. I don't recall the scuffle being mentioned in the 1538. Q And your attitude towards him wasn't very pleasant at that time; is that right? In other words, you resented the fact, as you testified, that he was involved in that scuffle; isn't that right? A That he testified? Q That you testified. A I testified he was involved in the scuffle? Q Yes, sir. A Yes, sir. Q Why did you hit him with the flashlight? A At the time that I hit him in the head with the flashlight I had just pulled Defendant Martinez off of Officer Pearson. There were two young ladies climbing on my back, hitting me, and he was advancing on me, and I had my flashlight on him, and I had no other recourse but to swing on him. Q Defendant Carnesi was not involved in the scuffle; you just thought he was advancing on you for that purpose; isn't  A He was involved. Q You testified he was advancing toward you? A Right. Q Then you hit him with the flashlight? A Right. Q At the time you hit him he was not involved in the scuffle; is that right? [PROSECUTOR]: I object. Argumentive. THE COURT: Overruled. You may answer. THE WITNESS: Well, in my opinion, he was in the scuffle, Now, I don't know  Q BY [DEFENSE COUNSEL]: I don't want your opinion. I just want the facts. You said you hit him as he was walking over toward you? A Advancing to me, yes, sir, I hit him. Q At the time he was not involved in the scuffle; isn't that right? A As far as I'm concerned, he was involved. Q What did he do that made you think he was involved in the scuffle? A He was advancing on my person. Q What did he do, walking toward you? A Yes, sir...."
